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 get list all parents of the given node ( include its self). i write a below code: the
<ul> <xsl:for-each select="$currentPage/ancestor-or-self::node"> <li><xsl:value-of select="@nodeName"/> </li> </xsl:for-each> </ul>
(PS: i consult from the xpath in the :http://videochatisnotmagical.umbraco.org/documentation/books/xslt-basics/xpath-axes-and-their-shortcuts article)
But nothing appears and it takes a lot of my time.
Any help would be appreciate.
Which version of Umbraco are you using?
Rich
Hi thanhtien501,
Your XSLT looks correct. Not sure why it would be taking a lot of time - it should be quite fast.
If you are using the new XML schema, which is default in Umbraco v4.5 ... then you'll need to switch the "node" to "*[@isDoc]", like so:
<xsl:for-each select="$currentPage/ancestor-or-self::*[@isDoc]">
Cheers, Lee.
Hi Huge help. it runs well.
well i'm using 4.6.0 alpha
Lee kelleher: it takes me a lot of time to find the error in the xslt code.
@thanhtien501: I know what you mean. Debugging XSLT isn't the easiest! If you have Visual Studio 2010 Pro, you can debug XSLT directly - eases the pain! ;-)
More info here: http://netaddicts.be/articles/xslt-debugging-your-umbraco-powered-website.aspx
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
get list all parents of the current node
I want to get list all parents of the given node ( include its self). i write a below code: the
(PS: i consult from the xpath in the :http://videochatisnotmagical.umbraco.org/documentation/books/xslt-basics/xpath-axes-and-their-shortcuts article)
But nothing appears and it takes a lot of my time.
Any help would be appreciate.
Which version of Umbraco are you using?
Rich
Hi thanhtien501,
Your XSLT looks correct. Not sure why it would be taking a lot of time - it should be quite fast.
If you are using the new XML schema, which is default in Umbraco v4.5 ... then you'll need to switch the "node" to "*[@isDoc]", like so:
Cheers, Lee.
Hi Huge help. it runs well.
well i'm using 4.6.0 alpha
Lee kelleher: it takes me a lot of time to find the error in the xslt code.
@thanhtien501: I know what you mean. Debugging XSLT isn't the easiest! If you have Visual Studio 2010 Pro, you can debug XSLT directly - eases the pain! ;-)
More info here: http://netaddicts.be/articles/xslt-debugging-your-umbraco-powered-website.aspx
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.