Developer forum

Forum » Templates » Root page in navigation

Root page in navigation


Reply
Hi guys

If I have a page structure like this:
    - Page 1
        - Page 2
        - Page 3
            - Page 4
    - Page 5
        - Page 6

Then how can I for page 2, 3, 4 and 6 find the top pages: "Page 1" and "Page 6" ?

Replies

 
Reply
Hi Martin

I believe an xPath looking like this would get you the top pagename, for your current element.

ancestor::Page[@AbsoluteLevel = '1']/@MenuText

If you need to know more on axes check out this page: http://pimpmyxslt.com/axesviz.aspx

 

You must be logged in to post in the forum