Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Created February 6, 2014 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziadoz/8848881 to your computer and use it in GitHub Desktop.
Save ziadoz/8848881 to your computer and use it in GitHub Desktop.
Perch Bug — When using the perch_content_create() function to create a region and then the perch_content() method to retrieve it, two regions get created — a shared one and one for the page.
<?php
require 'admin/runtime.php';
perch_content_create('Example Shared Region', array(
'template' => 'text_block.html',
'shared' => true,
));
?>
<!DOCTYPE>
<html lang="en">
<head>
<title>Perch Website</title>
</head>
<body>
<?php require 'header.php'; ?>
<p>Hello, World!</p>
<?php require 'footer.php'; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment