If $currentPage is "NodeA" and "Home" is the alias of the Document Type for the hidden node, you can very easily access the children of Home by doing this:
The fact that the node is hidden, is just a convention that if you use a property with the name umbracoNaviHide, the default XSLT "templates" (accessible in the Create XSLT file dialog) will skip nodes that have that property set. You can only truly hide a node from the XML by unpublishing it.
List Children of Child of one Node...How?
How Do I loop on children of an hidden child of a node? That is:
Content
-- NodeA (it)
---- Hidden Node (home)
--------- Children1
--------- Children2
--------- Children3
That is when I'm in NodeA, I wish children list of Hidden Node.
I try with this
<xsl:for-each select="$currentPage/ancestor-or-self::root/it/Home/*[@isDoc]">
but nothing.
Thanks
Hi Biagio,
If $currentPage is "NodeA" and "Home" is the alias of the Document Type for the hidden node, you can very easily access the children of Home by doing this:
<xsl:for-each select="$currentPage/Home/*[@isDoc]"> <p><xsl:value-of select="@nodeName" /></p> </xsl:for-each>
The fact that the node is hidden, is just a convention that if you use a property with the name umbracoNaviHide, the default XSLT "templates" (accessible in the Create XSLT file dialog) will skip nodes that have that property set. You can only truly hide a node from the XML by unpublishing it.
/Chriztian
I try, but don't works...My script is:
<xsl:value-of select="$currentPage/@nodeName"/> --> this return "it" value
<ul class="tabbed">
<xsl:for-each select="$currentPage/Home/*[@isDoc]">
<li>
<xsl:if test="@id = current()/@id">
<xsl:attribute name="class">current-tab</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:attribute name="id">nav-<xsl:value-of select="./umbracoUrlName"/></xsl:attribute>
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
I've empty list...
It's not possible unpublish node because, after, I can not publish children.
I try this
and I've tested that I'm in node "it" with <xsl:value-of select="$currentPage/@nodeName"/> ,but "for-each" ( see up ) return empty value..
Hi Biagio,
That simply means that "Home" is not the name/alias of the hidden Document Type - it's a case-sensitive name, maybe it's "home" ?
You can also reference it by @nodeName - e.g., if it's called 'Home' in the Content Tree you'd do this:
/Chriztian
This work...Thanks
is working on a reply...