Ancestor, current, Preceding-sibling and the Following-sibling Axis toghether Options
robfum
Posted: Thursday, August 28, 2008 6:12:43 PM
Rank: Newbie

Joined: 7/12/2008
Posts: 13
Location: Italy
I have this structure:

Contents
-page a
--page a1 (tab of page a)
--page a2 (tab of page a)
--page a3 (tab of page a)

All these four pages (a-a3) should be displayed as tabs of each one of them.
Is there an xpath istruction to list those 4 nodes independently of the current page?
I mean if I am on page a, I can use $currentPage/descendant-or-self::node, while if I am on page a1, a2 or a3 I need the ancestor (page a), the current, the Preceding-sibling and the Following-sibling Axis.

How can I achieve this result?

Many thanx

Rob




Dirk
Posted: Thursday, August 28, 2008 7:28:32 PM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,136
Location: Belgium
Hey Rob,

Have a look at the sitemap xslt that comes preinstalled with umbraco (Just select 'Sitemap' from the list of available templates). Guess you might need to tweak it bit to suit your needs, but at least, all nodes will be listed (up to a certain depth, which can be set using a parameter, or directly in the xslt file).

Regards,
/Dirk


level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
robfum
Posted: Saturday, August 30, 2008 12:55:24 AM
Rank: Newbie

Joined: 7/12/2008
Posts: 13
Location: Italy
Hi Dirk,

thank you again for your help. I will try your suggested method.
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.