how to select all parent node with specific document type
i need to get all parent node of current node with specific document type , i have tried all the following but they dont work.
i tried google and etc.. i couldnt find working answer.
so i posted it here
<xsl:for-each select="$currentPage/ancestor::* [@isDoc='News' and @level > $minLevel]">
<xsl:for-each select="$currentPage/* [name() = 'News' and string(umbracoNaviHide) != '1']">
<xsl:for-each select="$currentPage/../News[@isDoc and string(umbracoNaviHide) != '1][@level > $minLevel]"> </xsl:for-each>
In the example the document type is called News, so remember to change it if necessary, so it match your setup. In Umbraco there are different axes you can work with in XSLT, you probably already know that. But here is some information about XPath axes and their Shortcuts. http://our.umbraco.org/wiki/reference/xslt/xpath-axes-and-their-shortcuts
how to select all parent node with specific document type
i need to get all parent node of current node with specific document type , i have tried all the following but they dont work. i tried google and etc.. i couldnt find working answer. so i posted it here
<xsl:for-each select="$currentPage/ancestor::* [@isDoc='News' and @level > $minLevel]">
<xsl:for-each select="$currentPage/* [name() = 'News' and string(umbracoNaviHide) != '1']">
<xsl:for-each select="$currentPage/ancestor::*[@isDoc][not(self::NewsItem)] [ @level > $minLevel]">
thank you.
Hi Arash,
How about something like this:
<xsl:for-each select="$currentPage/../News[@isDoc and string(umbracoNaviHide) != '1][@level > $minLevel]">
</xsl:for-each>
In the example the document type is called News, so remember to change it if necessary, so it match your setup. In Umbraco there are different axes you can work with in XSLT, you probably already know that. But here is some information about XPath axes and their Shortcuts. http://our.umbraco.org/wiki/reference/xslt/xpath-axes-and-their-shortcuts
E.g to get the parent node:
Shorthanded method
Hope this helps,
/Dennis
is working on a reply...