If you want to test for a specific document-type alias, you can use that instead of the * wildcard, like so:
<xsl:if test="$currentPage/NewsItem[@isDoc and string(onTopNav) = '' and string(umbracoNaviHide) != '1']">
(note that I've removed the "count" from the test, you don't really need it ... if there are any nodes, then the XSLT will treat that as true, otherwise false.)
Hope that helps? Let us know if you have any other questions.
XSLT Based Nav
Good Evening.
I am building a website for my work with multiple levels of navigation. and two seperate navigation locations.
Top Nav [ horizontal] to configure this i have a variable onTopNav which is set to true if i want a page up there
Side Nav [ vertical ] anything page where onTopNav has no value
I am using an XSLT if to see if current page has sub nav items if so displays them:
<xsl:if test="count($currentPage/* [@isDoc and string(onTopNav) = '' and string(umbracoNaviHide) != '1']) > '0' ">
If page has no sub pages then it displays parent navigation
<xsl:if test="count($currentPage/* [@isDoc and string(onTopNav) = '' and string(umbracoNaviHide) != '1']) = '0' ">
I am looking change the first if so that if all the sub pages match a DocType such as NewsItem then the parent navigation is rendered.
Hope i am making myself clear.
Hi Ian,
If you want to test for a specific document-type alias, you can use that instead of the * wildcard, like so:
(note that I've removed the "count" from the test, you don't really need it ... if there are any nodes, then the XSLT will treat that as true, otherwise false.)
Hope that helps? Let us know if you have any other questions.
Cheers, Lee.
is working on a reply...