No Management Required: Master Pages

There are cases in which you want a page to be powered by Perch Runway, but you don’t really have any editable content on the page itself. The page does not require management, but it needs to exist.

A good example for this type of pages is an XML sitemap or an RSS feed. The content in these instances are coming from Perch Runway, but the editors do not need to manage anything on the page.

Instead of setting up an editable page with nothing to edit and confusing your editors, you can take advantage of Perch Runway’s Master Pages and Routing:

Master Pages

A Master Page is a PHP template that defines what appears on the page.

In Runway, every type of page in your site is created as a Master Page.


Perch Runway has a front controller and you can set up routes to “point to” or display some of your pages.

Adding Routes to Master Pages

Perch Runway allows you to add routes in 2 different ways:

  1. To an editable page (so you went to Pages on the control panel and created a new page)
  2. Directly to a master page

So you can add routes to a master page without adding it as an editable page in Runway. In the instance of a sitemap, you can create a master page template perch/templates/pages/sitemap.php, which can be something as simple as:

<?php header ("Content-Type: application/xml"); ?>
<urlset xmlns:xsi="" xsi:schemaLocation="" xmlns="">
        'template' => 'item_in_sitemap.html',
        'add-trailing-slash' => true,
        'flat' => true,
        'hide-extensions' => true,

Then you can add the routes directly to the master page:

On the edit form, add the URL pattern under “Routes”. The URL pattern in this case can be sitemap.xml. After saving the form going to will display the contents of the sitemap master page.

If you wanted your sitemap URL to be, your URL pattern would be feeds/sitemap.xml (note there’s no slash at the start). You can learn more about setting up your routes from the docs.


Related articles