I have an Umbraco V4 website which has a menu that I want to exclude certain document types from, I have tried the following, the bit in bold and underlined is the bit I have added but I don't think I have done this correctly because it is not working, can an XSLT expert give me some help?
Here's an example for the business website started pack, adapted from similar code to yours (sitemap.xslt, probably)
<xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap and @nodeTypeAlias!='NewsItem' and @nodeTypeAlias!='Event' and @nodeTypeAlias!='DateFolder']">
This would seem to fit right into your for-each above.
I had the ocd-esque urge to indent your code, and came across a potential problem in the if-else around the call-template. Basically you want to count and make sure no news articles are included in the count - try the following code (untested)
Exclude page from menu based on document type
Hi,
I have an Umbraco V4 website which has a menu that I want to exclude certain document types from, I have tried the following, the bit in bold and underlined is the bit I have added but I don't think I have done this correctly because it is not working, can an XSLT expert give me some help?
Hi There
Here's an example for the business website started pack, adapted from similar code to yours (sitemap.xslt, probably)
This would seem to fit right into your for-each above.
Dan
I had the ocd-esque urge to indent your code, and came across a potential problem in the if-else around the call-template. Basically you want to count and make sure no news articles are included in the count - try the following code (untested)
Dan
Thanks Dan,
That has worked perfectly. I know what I wanted to do and pretty much how I wanted to do it I just didn't know the correct syntax to make it happen!
is working on a reply...