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
I want to select the ID of the first child of the first child of the root node but can't seem to find how. This is what I have in the select:
$currentPage/ancestor-or-self::*[1]/child::*[1]/child::*[1]/@id
Try this:
$currentPage/ancestor-or-self[level='1'][1]/*[1]/*[1]/@id
nope doesn't work either.
This works perfectly for me
<xsl:value-of select="$currentPage/ancestor-or-self :: *[@isDoc] [@level=1]/*[@isDoc]/*[@isDoc]/@id"/>
thanks that works! any comments on why my snippet didn't work?
oops.. forgot the @level instead of just level.. my bad.
you don't need child::*
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Select a node in "up-down" style
I want to select the ID of the first child of the first child of the root node but can't seem to find how. This is what I have in the select:
$currentPage/ancestor-or-self::*[1]/child::*[1]/child::*[1]/@id
Try this:
nope doesn't work either.
This works perfectly for me
thanks that works! any comments on why my snippet didn't work?
oops.. forgot the @level instead of just level.. my bad.
you don't need child::*
is working on a reply...