Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
I'm quite new to umbraco and esspecially xslt.
I've this structure:
Home
-> Company
-> Products
->-> Product 1
->-> Product 2
-> News
I want to create a menu that only contains the nodes within the Products folder.
Thanks for helping!
Hi,
Bit sad there's no starting point, so you've got no xslt so far...
Anyway, start with following code snippet:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1234)/* [@isDoc]"><a href="{umbraco.library:NiceUrl(@id)}">@nodeName</a></xsl:for-each>
this will iterate all child nodes of node with id = 1234 (Of course, change that to reflect the id of your 'Products' node)
And to make it a bit more generic, you could use a parameter to pass to your xslt and use that parameter value instead of the hardcoded value 1234
Hope this helps.
Cheers,
/Dirk
And a good starting point to learn more about xslt in umbraco: http://our.umbraco.org/wiki/reference/xslt
Thanks.
Added some:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1161)/* [@isDoc]"> <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a><br/> </xsl:for-each>
Ha, good catch, will teach me to check my answers more thoroughly.
;-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting nodes from a specific folder
Hi all,
I'm quite new to umbraco and esspecially xslt.
I've this structure:
I want to create a menu that only contains the nodes within the Products folder.
Thanks for helping!
Hi,
Bit sad there's no starting point, so you've got no xslt so far...
Anyway, start with following code snippet:
this will iterate all child nodes of node with id = 1234 (Of course, change that to reflect the id of your 'Products' node)
And to make it a bit more generic, you could use a parameter to pass to your xslt and use that parameter value instead of the hardcoded value 1234
Hope this helps.
Cheers,
/Dirk
And a good starting point to learn more about xslt in umbraco: http://our.umbraco.org/wiki/reference/xslt
Cheers,
/Dirk
Thanks.
Added some:
Ha, good catch, will teach me to check my answers more thoroughly.
Cheers,
/Dirk
;-)
is working on a reply...