Hi there,
I am trying to show two sub pages in the sitemap.xml file, while hiding the parent. Consider these three pages:
- Services
- Service 1
- Service 2
In sitemap.xml, I only want to show Service 1 and Service 2. However, as soon as I uncheck "Show in Sitemap" for the Services parent item, Service 1 and Service 2 don't show up in the sitemap anymore.
Is this a bug or a feature?
Imar
Developer forum
E-mail notifications
Showing Child Pages in the Sitemap when Parent is hidden
Posted on 27/07/2010 14:55:48
Replies
Nicolai Høeg Pedersen
Posted on 27/07/2010 15:17:02
I'm affraid it is a feature - can't show anything further down in the tree if a node is missing - that is how it is thought...
BUT - the sitemap is 'just' a navigation - so you can make a sitemap using a navigation tag and test on ShowInSitemap attribute of the page node...
BUT - the sitemap is 'just' a navigation - so you can make a sitemap using a navigation tag and test on ShowInSitemap attribute of the page node...
Posted on 27/07/2010 16:22:46
Hi Nicolai,
Thanks for the answer.
I am not 100% sure what you mean or how to implement this. I was talking about the Google sitemap.xml file. When I uncheck the parent item, the node and underlying items are not available so I don't know what to test where.
When processing the tree in a NavigationProvider, the item doesn't show up there either.
Imar
Thanks for the answer.
I am not 100% sure what you mean or how to implement this. I was talking about the Google sitemap.xml file. When I uncheck the parent item, the node and underlying items are not available so I don't know what to test where.
When processing the tree in a NavigationProvider, the item doesn't show up there either.
Imar
Nicolai Høeg Pedersen
Posted on 27/07/2010 16:34:24
Oh - thought you meant sitemap module...
Then there is no workaround.
Just changed the behaviour so it is handled by the XSLT and not the navigation object to handle wether show in sitemap is having an effect on the sitemap output.
That means, that you can handle this from SEOSitemap.xslt:
Then there is no workaround.
Just changed the behaviour so it is handled by the XSLT and not the navigation object to handle wether show in sitemap is having an effect on the sitemap output.
That means, that you can handle this from SEOSitemap.xslt:
<xsl:if test="@ShowInSitemap='True'">
<loc>
<xsl:value-of select="@FriendlyHref" disable-output-escaping="yes"/>
</loc>
</xsl:if>
Posted on 27/07/2010 16:47:58
Makes perfect sense. Thanks!
Imar
Imar
You must be logged in to post in the forum