Forum

Thread tagged as: Question, Discussion

Approaches to headers and footers

This isn't a support request, so there's no need for diagnostics.

People seem to be using the PHP function perch_layout() to include headers and footers that are common across Perch websites, apparently not so differently than how it might be done in some applications of WordPress. I guess these layouts are based on templates from the templates/layout directory, empty by default.

I don't understand how layouts are referenced in the dashboard.

But "Master pages" appear prominently in the dashboard and seem to facilitate editing based on regions, which I seem to understand. Couldn't every page simply incorporate the header and the footer through one master page?

Then again, I could probably simply use shared regions for all the fields in the header and footer instead.

Is there a best way to have all the fields in the header and footer easily editable, the same way regions are?

I cut out my header into a file "header.php" in /templates/layouts/header, but it didn't render on the webpage or show up in the dashboard, even after I put a region call in it and reloaded the page and then logged out of perch and logged back in.

Paul Lee

Paul Lee 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

If it isn't a support request I'm not sure how to help.

The docs for layout are here: https://docs.grabaperch.com/docs/layouts/

If you decide you want some help them we will need to see your Diagnostics Report and code.