XSLT list items by document type from anywhere in the site structure
Hi there,
I would like to work out how, in xslt, to display all nodes
of a particular document type no matter where they are in the content tree.
This is the code I have to display them if they sit below the current page:
If you want to show all of the pages of a certain type in the entire content tree, you can go to the root of the site, and then run through all of the nodes with some code like this:
Please remember to mark an answer as the solution for further reference, and to help others that come across this post with the same or a similar problem.
XSLT list items by document type from anywhere in the site structure
Hi there,
I would like to work out how, in xslt, to display all nodes of a particular document type no matter where they are in the content tree. This is the code I have to display them if they sit below the current page:
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:for-each select="$currentPage/IPOPartner">
<p>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</p>
Hi Clare,
Try to use this code, and see if it solved your problem.
Hope this can help you.
/Dennis
Hi Clare
If you want to show all of the pages of a certain type in the entire content tree, you can go to the root of the site, and then run through all of the nodes with some code like this:
You can of course use the same selector in a apply-templates, but I just wanted to show you the correct xpath in your current context.
Hope this helps a bit.
/Kim A
Thanks so much that worked perfectly!
Great to hear Clare!
Please remember to mark an answer as the solution for further reference, and to help others that come across this post with the same or a similar problem.
/Kim A
is working on a reply...