Addressing specific node Options
Sekuta
Posted: Sunday, July 06, 2008 2:11:57 PM
Rank: Newbie

Joined: 7/6/2008
Posts: 4
Hi guys,

i am a umbraco and xslt noob.
How do i address a specific node?
I have two different navigations split up in two nodes.

What needs to be changed here?
Code:
<xsl:for-each select="$currentPage/ancestor-or-self::node">


thanx alot
Dirk
Posted: Sunday, July 06, 2008 10:54:40 PM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,022
Location: Belgium
Hi Sekuta,

As to your first question, you may get to a specific node by specifying its id or, in xslt:

Code:
umbraco.library:GetXmlNodeById(id)


For example, to loop throuhg all child nodes of node with id=1, you'd write

Code:
<xsl:for-each select="umbraco.library:GetXmlNodeById(1222)//node">
...blahblah...
</xsl:for-each>


How do you want the navigation. Could you give us some hints on how you've structured your navigation tree then?

Hope that helps.
Regards,
/Dirk




level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Sekuta
Posted: Monday, July 07, 2008 8:49:19 AM
Rank: Newbie

Joined: 7/6/2008
Posts: 4
Yes, that works!

I built a navigation with two different branches:

-Nav1
--Site1
--Site2
--Site3

-Nav2
--Site1
--Site2
--Site3

Thank you Dirk Applause
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.