Skip to content

Commit

Permalink
Merge pull request #7 from BlueM/1.0
Browse files Browse the repository at this point in the history
BUGFIX: Skip pages with ``metaRobotsNoindex`` in ``sitemap.xml``
  • Loading branch information
aertmann committed Mar 2, 2016
2 parents 4437719 + 0c3ea53 commit b688359
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Resources/Private/Templates/Page/XmlSiteMap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
</urlset>
<f:section name="itemsList">
<f:for each="{items}" as="item">
<url>
<loc>{neos:uri.node(node: item.node, format: 'html', absolute: true)}</loc>
<f:if condition="{item.node.properties.xmlSitemapChangeFrequency}"><changefreq>{item.node.properties.xmlSitemapChangeFrequency}</changefreq></f:if>
<priority>{f:if(condition: item.node.properties.xmlSitemapPriority, then: item.node.properties.xmlSitemapPriority, else: '0.5')}</priority>
</url><f:if condition="{item.subItems}"><f:render section="itemsList" arguments="{items: item.subItems}"/></f:if>
<f:if condition="{item.node.properties.metaRobotsNoindex} == 0">
<url>
<loc>{neos:uri.node(node: item.node, format: 'html', absolute: true)}</loc>
<f:if condition="{item.node.properties.xmlSitemapChangeFrequency}"><changefreq>{item.node.properties.xmlSitemapChangeFrequency}</changefreq></f:if>
<priority>{f:if(condition: item.node.properties.xmlSitemapPriority, then: item.node.properties.xmlSitemapPriority, else: '0.5')}</priority>
</url>
</f:if>
<f:if condition="{item.subItems}"><f:render section="itemsList" arguments="{items: item.subItems}"/></f:if>
</f:for>
</f:section>
</f:section>

0 comments on commit b688359

Please sign in to comment.