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 all. Sorry if I duplicate someone else's post.
I know "Project" page id. For example 1070. And I want to get Project's child (pr1, pr2, pr3).
I've tried to do such:
<xsl:variable name="project" select="umbraco.library:GetXmlNodeById(1070)"/><xsl:variable name="projectItems" select="$footer/ancestor-or-self::* [@isDoc and @level = 2]/* [@isDoc and string(umbracoNaviHide) != '1']"/><xsl:if test="count($projectItems) > 0"> <xsl:for-each select="$footerItems"> <!--to do something--> </xsl:for-each></xsl:if>
But when I visualize xslt I get a message "The XSLT didn't generate any output".
Could You please help?
Have you declared a $footerItems variable?
If you want to iterate the child nodes of your project node/variable then just:
<xsl:for-each select="$project/child::* [@isDoc and umbracoNaviHide != 1]">
Oh sorry. I was mistaken.
<xsl:variable name="project" select="umbraco.library:GetXmlNodeById(1070)"/><xsl:variable name="projectItems" select="$footer/ancestor-or-self::* [@isDoc and @level = 2]/* [@isDoc and string(umbracoNaviHide) != '1']"/><xsl:if test="count($projectItems) > 0"> <xsl:for-each select="$projectItems"> <!--to do something--> </xsl:for-each></xsl:if>
Thanks, Ernst. Your advice was very helpful.
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 child nodes by parent id
Hi all. Sorry if I duplicate someone else's post.
I know "Project" page id. For example 1070. And I want to get Project's child (pr1, pr2, pr3).
- Home
- Project
- pr1
- pr2
- pr3
- About us
I've tried to do such:
But when I visualize xslt I get a message "The XSLT didn't generate any output".
Could You please help?
Have you declared a $footerItems variable?
If you want to iterate the child nodes of your project node/variable then just:
Oh sorry. I was mistaken.
Thanks, Ernst. Your advice was very helpful.
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.