Thread tagged as: Problem, Question

Page Attributes in Sitemap Template

Hi there,

I'm having difficultly extending the site map guide here: to have more options for my client.

I cannot get the page attributes I've set to appear. Here is my default.html template:

<perch:template path="pages/attributes/seo.html" />

<perch:pages divider-before="Sitemap" id="changefreq" label="Change Frequency" type="select" options="always,hourly,daily,weekly,monthly,yearly,never" help="How frequently the page is likely to change. The value 'always' should be used to describe documents that change each time they are accessed. The value 'never' should be used to describe archived URLs." default="monthly"/>

<perch:pages id="priority" label="Priority" type="select" options="0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0" help="Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index." default="0.5" />

and the sitemap.html template:

<perch:before><?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="">

    <loc><perch:pages id="pagePath" /></loc>
    <lastmod><perch:pages id="pageModified" /></lastmod>
    <perch:if exists="changefreq"><changefreq><perch:pages id="changefreq" /></changefreq></perch:if>
    <perch:if exists="priority"><priority><perch:pages id="priority" /></priority></perch:if>



James Wigger

James Wigger 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you displaying the site map?

Hi Drew,

It's output using perch_pages_navigation:

    header('Content-type: application/xml');
    'use-attributes' => true
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does adding <perch:showall /> to the template reveal anything?


It seems like they are being added to the database at least.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not quite sure what you're telling me there - where's that JSON from?