Developer forum

Forum » Templates » Get all nodes untill specifc node reached

Get all nodes untill specifc node reached

Filip Lundby
Reply
I want select all nodes and subnodes untill I get to a node with @MenuText = "_" (a root productgroup or whatever it's called).

How would I do that? I've tried with "following-sibling" and "preceding-sibling", but having a hard time making it work.
<xsl:apply-templates select="Page[@ID = $PageID and following-sibling::Page[@MenuText='_']]//Page" />


Replies

 
Dmitriy Benyuk
Reply
Hi Filip,

can you try this:
<xsl:apply-templates select="Page[@ID = $PageID and following-sibling::Page[@MenuText='_']]" />


 

You must be logged in to post in the forum