If I understand your question correctly you want to display the level 3 links some where on your site.
If so you should be able to use the build-in xlst with the name: List Subpages from a changeable source. I think this xslt file vil do what you are asking for.
But when you create the file, you have to create a matching macro. On the macro you have to add a parameter with the name source (The alias) The name could be Pick a node, and the type have to be a content picker. When you a the xslt file, in your template, you have to pick the parent node, of the links that so be shown.
<!-- Don't change this, but add a 'contentPicker' element to --> <!-- your macro with an alias named 'source' --> <xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here --> <ul> <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </xsl:template> </xsl:stylesheet>
Thanks to all of you. It is displaying leaf nodes that are not included in level 3. Specifically how do I display the level 3 nodes for this level 1 node above - AnotherDocAt-Level 1 . Please see illustrated diagram above. For multiple language support purposes, hard coding the source level is undesirable.
Displaying 3 level node items in a content tree
I have a content the following content tree:
Content
en
ADocAt-Level 1 - {uses doctype A}
ADocAt-Level 2 - {uses doctype B}
ADocAt-Level 3 - {uses doctype C}
AnotherDocAt-Level 1 - {uses doctype A}
BDocAt-Level 2 - {uses doctype B}
SomeDocAt-Level 3 - {uses doctype C}
CDocAt-Level 2 - {uses doctype B}
OtherDocAt-Level 3 - {uses doctype C}
YetAnotherDocAt-Level 1 - {uses doctype A}
How do iterate through the content tree using a macro created from a xslt document in order to display all the links from level 3 without had coding.
Hi Paul,
If I understand your question correctly you want to display the level 3 links some where on your site.
If so you should be able to use the build-in xlst with the name: List Subpages from a changeable source. I think this xslt file vil do what you are asking for.
But when you create the file, you have to create a matching macro. On the macro you have to add a parameter with the name source (The alias) The name could be Pick a node, and the type have to be a content picker. When you a the xslt file, in your template, you have to pick the parent node, of the links that so be shown.
An exampel:
I hope this will helps you answer your question.
/Dennis
Paul,
Dennis' answer is fine, but you do without specifying the source param. All that needs changing is
<xsl:for-eachselect="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<ahref="{umbraco.library:NiceUrl(@id)}">
<xsl:value-ofselect="@nodeName"/>
</a>
</li>
</xsl:for-each>
into
<xsl:for-eachselect="$currentPage/ancestor-or-self::* [@isDoc and @level= 1]//* [@isDoc and @level = 3]">
<li>
<ahref="{umbraco.library:NiceUrl(@id)}">
<xsl:value-ofselect="@nodeName"/>
</a>
</li>
</xsl:for-each>
Cheers,
/Dirk
Thanks to all of you. It is displaying leaf nodes that are not included in level 3. Specifically how do I display the level 3 nodes for this level 1 node above - AnotherDocAt-Level 1 . Please see illustrated diagram above. For multiple language support purposes, hard coding the source level is undesirable.
ok, I figured it out. I was able to use the docmentType in the <xsl:for-each/> loop.
<xsl:for-each select="$currentPage/documentTypeAlias/AnotherDcumentTypeAlias [@isDoc and string(umbracoNaviHide) != '1']">
...
</xsl:for-each>
Thanks for your assistance all.
is working on a reply...