Forum

Thread tagged as: Question, Problem

Perch Content Custom question(s)

Hi,

I have an include file with following code:

<?php include($_SERVER['DOCUMENT_ROOT'].'/perch/runtime.php');?>
<?php header('Last-modified: . the_modified_date()');?>
<?php PerchSystem::set_var('heading2','Website Name');?>
<?php PerchSystem::set_var('heading3',perch_pages_title(true));?>
<?php perch_layout('global.header',array('business_name'=>'Business Name'));?>

that is included at the top of each index.php file for the website and directories, as well as:

<?php include('_includes/global.inc');?>
<?php perch_content_create('page_content',array('template'=>'_page_content.html'));?>

which I use to create content regions that are accessed in Perch via:

<?php perch_content_custom('page_content');?>

however if I try to change the filename, e.g. to _text_content.html or text_content for any references I see nothing.

Any assistance with this would be greatly appreciated.

Regards

Garth Holmes

Garth Holmes 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

however if I try to change the filename

Sorry, which file name?

Hi Drew,

In the second code block.

It seems that all I need to do is change the template in Perch in Region Options, as well as the Region Key (friendly name).

Drew McLellan

Drew McLellan 2638 points
Perch Support

perch_content_create() creates the region if it doesn't exist. It doesn't modify an existing region at all. So if you change the options, they'll only affect new regions created with those options.