Forum

Thread tagged as: Question, Problem

Master Pages

Where do pages live on my server once they are created using a master page?

Also, is there a way to have all pages created under a specific master page to update automatically if the master page is changed?

I had to make a change to a master page that was used to create a bunch of pages, but now I can't figure out how to have the other pages update or where to find them to make the change manually.

Ryan McGuire

Ryan McGuire 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which product are you using?

Regular Perch

Drew McLellan

Drew McLellan 2638 points
Perch Support

The pages get created at whatever the path for the new page is. If your master page is configured to copy, the new pages will be stand-alone and won't update. If it's set to reference, then the new pages will update as the master page updates.

Where do I make selection/configuration for a new page to "reference"?

When creating a page, under "Master Page", I see options for:

  • page already exist, or is a link only
  • or an option to select a page template I created.

If I choose my page template it doesn't update if I update the page template.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

You would do this when setting up the Master Page: https://docs.grabaperch.com/perch/pages-and-nav/pages/master-pages/

I think I might be experiencing a different issue. I created my master page using the following content templates the sections of the page.

<?php perch_content_create('Navigation', array( 'template' => 'example_template.html', )); ?>

The page is successfully created through the "Add Page" option, all my content regions show up under the page in Perch, but if I add any content it doesn't show up on the website. Note that pages I create without the "Add Page" option work fine.

Any ideas?

I think I figured it out. It looks like if I add the following it works:

<?php perch_content('Example Template'); ?> <?php perch_content_create('Example Template', array( 'template' => 'example_template.html', )); ?>

Is this the correct configuration for creating master page content regions?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd need to reorder those so you call perch_content_create() first otherwise it'll have no effect.