I'm trying to build a script for Umbracon my internship. The point of the script is the following.
I'd like to execute it from any node, make it scan from the root down, and look for a node named "Slider" which is of type Textpage, and when he found that one, he should scan that node only, and get all the children (which will be of the doc type "Slide"), so I can put a slider anywhere, and he'd still be able to just create a folder named "Slider" to contain the slides needed as childnodes.
What I have so far:
<!--Scan from current page--> <xsl:for-each select="$currentPage/*"> <!-- If the nodename is "Slider", i need to list all your child nodes --> <xsl:if test="@nodeName = 'Slider'"> <!-- Print the name for debug (should be "Slider")--> <xsl:value-of select="@nodeName"/><br/> <!-- I'd like to give the node "slider" as input for the nested for each loop--> <xsl:for-each select="@id/*"> <xsl:value-of select="@nodeName"/><br/> </xsl:for-each> </xsl:if> </xsl:for-each>
Any help would be greatly appreciated! Thanks in advance!
Okay, I've got something more like it! I'm getting the hang of this.. I guess.
So, when I run the XSLT from the "Home" node, it does what I want it to do. Now I should get it to run from any node any where, but still start from the root node.
Nest for each to scan all nodes
Hello,
I'm trying to build a script for Umbracon my internship. The point of the script is the following.
I'd like to execute it from any node, make it scan from the root down, and look for a node named "Slider" which is of type Textpage, and when he found that one, he should scan that node only, and get all the children (which will be of the doc type "Slide"), so I can put a slider anywhere, and he'd still be able to just create a folder named "Slider" to contain the slides needed as childnodes.
What I have so far:
Any help would be greatly appreciated! Thanks in advance!
Okay, I've got something more like it! I'm getting the hang of this.. I guess.
So, when I run the XSLT from the "Home" node, it does what I want it to do. Now I should get it to run from any node any where, but still start from the root node.
Thanks!
What i've got now:
I've found the solution!
And then you can for example start your for each like this:
Thanks anyway! :)
is working on a reply...