At a glance I'm thinking that you should be able to achieve this by adding <xsl:if test="$currentPage/ancestor-or-self::pdfs"> or whatever the property of your pdf's document type is of course (It must of course also be unique of course otherwise if it's just a generic textpage like the rest it will go all the way to level 1) :)
Thanks for the ideal. The above stucture is just one section of the site. The menu will be used across the site and so would need to work across mutiple doucments types. One thought I had was to check the child parent id of the current page on level 4 nodes and if this matched, then use this to control when the level 5 nodes are displayed. And when on level 5 nodes, check the parent page id - level 4 - against the parent id of the child page to display the child nodes. In theory I think it should work, although I've not yet managed it in the xslt.
Only show child node in current section
Hi All,
Been creating a menu, which is similiar to 'menu from changable source'. Which starts in the current section and lists nodes from level 2 to 5.
Site stucture is:
- resources
- pdfs
- doc one
- audio
- ...
I almost there and can replicate the above on each page. But would like to only show the 'doc one' item when either on the 'pdfs' and 'doc one' pages.
My xslt is:
Using Umbraco 4.7.1
Thanks in advance,
Eddie
Hi Eddie
At a glance I'm thinking that you should be able to achieve this by adding <xsl:if test="$currentPage/ancestor-or-self::pdfs"> or whatever the property of your pdf's document type is of course (It must of course also be unique of course otherwise if it's just a generic textpage like the rest it will go all the way to level 1) :)
/Jan
Hi Jan,
Thanks for the ideal. The above stucture is just one section of the site. The menu will be used across the site and so would need to work across mutiple doucments types. One thought I had was to check the child parent id of the current page on level 4 nodes and if this matched, then use this to control when the level 5 nodes are displayed. And when on level 5 nodes, check the parent page id - level 4 - against the parent id of the child page to display the child nodes. In theory I think it should work, although I've not yet managed it in the xslt.
Eddie
Hi Jan,
All working now, wrapped an if statement around the call to the level4 template.
<xsl:if test="$currentPage/self::*/@id = ./*/@parentID">
<xsl:call-template name="level4"></xsl:call-template>
</xsl:if>
Thanks,
Eddie
is working on a reply...