I am generating xslt to display all documents of Type "PersonalUpdatePage" , current page is home page, and this document type not straignt under home page, it can be under any other folders and any level.
how to do this?
I tried below didn't work for me.
<xsl:for-each select="umbraco.library:GetXmlAll()//node [@nodeTypeAlias='DisastersPage']/node [@isDoc and string(umbracoNaviHide) != '1']">
<xsl:for-each select="umbraco.library:GetXmlAll()//node [@nodeTypeAlias='DisastersPage' and @isDoc and string(umbracoNaviHide) != '1']">
<xsl:for-each select="currentPage/ancestor-or-self::* [@nodeTypeAlias='DisastersPage']/node [@isDoc and string(umbracoNaviHide) != '1']">
get all nodes of given doctype from home page
version 4.7.1
I am generating xslt to display all documents of Type "PersonalUpdatePage" , current page is home page, and this document type not straignt under home page, it can be under any other folders and any level.
how to do this?
I tried below didn't work for me.
<xsl:for-each select="umbraco.library:GetXmlAll()//node [@nodeTypeAlias='DisastersPage']/node [@isDoc and string(umbracoNaviHide) != '1']">
<xsl:for-each select="umbraco.library:GetXmlAll()//node [@nodeTypeAlias='DisastersPage' and @isDoc and string(umbracoNaviHide) != '1']">
<xsl:for-each select="currentPage/ancestor-or-self::* [@nodeTypeAlias='DisastersPage']/node [@isDoc and string(umbracoNaviHide) != '1']">
Try this:
<xsl:for-each select="$currentPage/ancestor-or-self::*[@level = 1]/descendant-or-self::DisastersPage[@isDoc and not(umbracoNaviHide = 1)]" />
For more info on xpath axes this webpage is awesome: http://pimpmyxslt.com/axesviz.aspx
Hi Pat
The code you quote is for an old xml schema and not the schema within 4.7.1
Assuming you are always going to be on the home page and not needing to traverse back up to the home page then this should work:
<xsl:for-each select="$currentPage//PersonalUpdatePage[@isDoc and not(umbracoNaviHide = 1)]" />
The double slashes indicate to get all matches below the home page irrespective of the depth.
HTH
Nigel
is working on a reply...