Forum

Thread tagged as: Question, Problem, Forum

Problem with regions

Hi there I am totally new to Perch...got a website that I need to keep developing using Perch...I tried to create a new page called privacy-notice (and appear in the list of pages in Perch). But I have a problem as my region called 'my test region' does not uploaded automatically to Perch ...and I cant figure out how to add the name region on the perch interface... <h1><?php perch_content('My test region'); ?></h1> Any idea? Many thanks in advance for your suggestion

Jon Marsh

Jon Marsh 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to make sure the code you've shown us is in the page, and then load that page up in your browser. The region should then appear in the control panel.

Hi Drew Thanks so much for your answer. This is I believe I do 1. First I did the php page with notepad++ test.php
2. add the code with the 'test region' 3. enter the url : domain.local...to see 4. and check my perch but does not show My code so far are simple: <?php echo $_SERVER["REQUEST_URI"]; ?> <?php include($_SERVER["DOCUMENT_ROOT"] . '/includes/header.php'); ?> <h1><?php perch_content('My test region'); ?></h1> <div class="clear"></div> <?php include($_SERVER["DOCUMENT_ROOT"] . '/includes/footer.php'); ?> Many thanks

When you browse to that page, what do you see? The header and footer content? Yes?

If it were me, I would add some simple non-Perch text on the page next to the Perch region and view the page and page source to check what's there.

Hi Clive I did as you suggested but the my test-region does not show on the perch... But the h1 display... <?php echo $_SERVER["REQUEST_URI"]; ?> <?php include($_SERVER["DOCUMENT_ROOT"] . '/includes/header.php'); ?> <h1><?php perch_content('My test region'); ?>my test header</h1> <div class="clear"></div> <?php include($_SERVER["DOCUMENT_ROOT"] . '/includes/footer.php'); ?> Any idea please... 1- I did add the text 'my test header in my php notepad++ 2- I did enter the url domain.local and it display with the text header 3- login on perch domain but region 'my test region' not showing 4- try reload the page in case that is because I was not login on perch but same, the region not showing Many thanks for your help

Thanks very much Clive. I did check all but no luck...any other idea?

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hi Jon,

Are you including the Perch runtime as instructed in the documentation?

<?php include('perch/runtime.php'); ?>

Tip

Instead of doing the following to include headers, footers etc:

include($_SERVER["DOCUMENT_ROOT"] . '/includes/header.php');

You use Perch Layouts:

perch_layout('header');

Does your page look something like this?

<?php 
include('perch/runtime.php');
perch_layout('header'); 
?>

<h1><?php perch_content('My test region'); ?></h1>

<?php perch_layout('footer'); ?>

Hi all

Still in the same issue.

When i wrote the code, test the page locally all is working... If I want to upload the content to perch nope

<?php echo $_SERVER["REQUEST_URI"]; ?>_
<?php include('perch/runtime.php');?>
<h1><?php perch_content('header') ;?>my test header</h1>
<p><?php perch_content('info'); ?>my text test t1</p>

I load the URL first in browser * domain.local * Then I check on perch already login and nothing has been updated It is probably something little...any idea? i try all the the suggestions but does not look to work

You can get the help from https://Quickensupports.org contact them.