Page Type master template appears in sitemap.xml
Permalink
I'm using advanced permissions and have a blog_entry page type which I set permissions manually so that writers cannot add any subpages to a blog entry.
However, now the blog_entry master template shows up in the sitemap.xml (since it now passes the canRead test in generate_sitemap.php).
I've added this bit of code to generate_sitemap.php to solve the problem, but is there a better way to do this?
However, now the blog_entry master template shows up in the sitemap.xml (since it now passes the canRead test in generate_sitemap.php).
I've added this bit of code to generate_sitemap.php to solve the problem, but is there a better way to do this?
// exclude page type defaults if ( ($ctID = $c->getCollectionTypeID()) != 0) { $ct = CollectionType::getByID($ctID); $mst = $ct->getMasterTemplate(); if ( $mst->cID == $c->cID ) { continue; } }
We are using advanced permissions, have set permissions in the Page Type Defaults through 'Manual' to make sure they then promulgate through to newly added pages.
The Page Type in question is set to be included in the sitemap.xml file via the standard page attribute, and permissions are used to prevent day-to-day editors from changing it.
However, it seems that the sitemap.xml is picking up the root Page Type Default as being included in the sitemap.xml, instead of only the genuine pages created that inherit the defaults / attributes from the 'Default'.
Surely this is a bug? Why would you want Page Type Defaults to appear in your sitemap.xml?