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
I'm trying to find a way of displaying a list of nodes on every page of my site. The nodes I want to display sit under a specific node. Is there a way I can show every node under the specified node ID?
Thanks for any help.
Yes,
if you're using the nodefactory you can query a certain node for its children, and iterate over them, a quick example:
Node _node = new Node(id);foreach (Node _n in _node.Children) {
// do stuff
}
For 4.5
<!--Loop children from certain node--> <xsl:for-each select="umbraco.library:GetXmlNodeById('18616')/* [@isDoc][string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each>
Prior to 4.5
<!--Loop children from certain nodeà<xsl:for-each select="umbraco.library:GetXmlNodeById('18616')/node [string(data[@alias='umbracoNaviHide']) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a></li></xsl:for-each>
<!--Loop children from certain nodeà
<xsl:for-each select="umbraco.library:GetXmlNodeById('18616')/node [string(data[@alias='umbracoNaviHide']) != '1']">
<li>
<a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>
</li>
</xsl:for-each>
You will need to update the node id to the one you need.
Rich
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Display list of nodes on every page of site?
I'm trying to find a way of displaying a list of nodes on every page of my site. The nodes I want to display sit under a specific node. Is there a way I can show every node under the specified node ID?
Thanks for any help.
Yes,
if you're using the nodefactory you can query a certain node for its children, and iterate over them, a quick example:
Node _node = new Node(id);
foreach (Node _n in _node.Children) {
// do stuff
}
For 4.5
Prior to 4.5
You will need to update the node id to the one you need.
Rich
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.