I have created a structure in my Content like following: A is parent, B is child of A, C is child of B and C1 is child of C. All are of different document type.
A
----B
-------C
-------------C1
I want to fetch the value of property associated with C1. i am in C page xslt.
i tried to get the data of C1 but failed. here is the code
If you want to be able to access the data at "C1" (level 4) from any other page level, then you will need to use the XPath to navigate up the nodes, then back down again, like so:
<xsl:variable name="items" select="$currentPage/ancestor-or-self::*[@isDoc and @level = 1]/descendant::*[@isDoc and @level = 4 and string(umbracoNaviHide) != '1']"/>
How to fetch content 3rd level data
Hi
I have created a structure in my Content like following: A is parent, B is child of A, C is child of B and C1 is child of C. All are of different document type.
A
----B
-------C
-------------C1
I want to fetch the value of property associated with C1. i am in C page xslt.
i tried to get the data of C1 but failed. here is the code
<xsl:variable name="items" select="$currentPage/ancestor-or-self::*[@isDoc and @level = 3]/* [@isDoc and string(umbracoNaviHide) != '1']"/>
<xsl:if test="count($items) > 0">
<ul>
<xsl:for-each select="$items">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
<xsl:for-each select="$currentPage/node"/>
</xsl:for-each>
</ul>
</xsl:if>
Please let me know how to fetch the 3rd level data from 2nd page.
Any help would be highlt appreciated
Hi Gunjan,
If you want to be able to access the data at "C1" (level 4) from any other page level, then you will need to use the XPath to navigate up the nodes, then back down again, like so:
Cheers, Lee.
is working on a reply...