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
I have this structure
content
- Website
-- Solutions
--- SolutionGroup1
---- Solution1
---- Solution2
--- SolutionGroup2
---- Solution4
No matter what page under Solutions i am, whether its Solution1 or SolutionGroup1 I need to output the ancestor Solutions (level2) - how do I do this?
Hi Daniel,
You almost said it yourself...
<xsl:value-of select="$currentPage/ancestor-or-self::*[@level = 2]" />
/Chritztian
Hi again ;),
That was also my first thought, but i get this output:
Løsninger0LøsningerLøsningerERP0ERPERPDynamics0DynamicsDynamicsNAV0NAVNAVCRM0CRMCRM
Yeah - OK, that's just the complete text() content of that node - you should of course select the item you want to output, e.g.:
<xsl:variable name="solutions" select="$currentPage/ancestor-or-self::*[@level = 2]" /> <xsl:value-of select="$solutions/@nodeName" />
/Chriztian
But then its not dynamic? :(
EDIT: Nevermind, it is - but I don't understand it. - You have to teach me about it at next XSLTPPF...
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
Getting the ancestor but only of a specific level
Hi
I have this structure
content
- Website
-- Solutions
--- SolutionGroup1
---- Solution1
---- Solution2
--- SolutionGroup2
---- Solution4
No matter what page under Solutions i am, whether its Solution1 or SolutionGroup1 I need to output the ancestor Solutions (level2) - how do I do this?
Hi Daniel,
You almost said it yourself...
/Chritztian
Hi again ;),
That was also my first thought, but i get this output:
Løsninger0LøsningerLøsningerERP0ERPERPDynamics0DynamicsDynamicsNAV0NAVNAVCRM0CRMCRM
Yeah - OK, that's just the complete text() content of that node - you should of course select the item you want to output, e.g.:
/Chriztian
But then its not dynamic? :(
EDIT: Nevermind, it is - but I don't understand it. - You have to teach me about it at next XSLTPPF...
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.