i have a gallery node type with alias "GalleryAlbum". when opening that node this will show the doc type nodes with alias "GalleryPhoto". I dont want these "photo nodes" showing up in my menu and i dont want to hardcode to hide the nodes based on the id, as i might want to create several galleries. any thoughts appreciated.
although i wanted to get the GalleryPhoto-check in the first line, but didnt manage to do it. any thoughts to get in in the first line instead of another xsl test?
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1' and @level = '3']"> <xsl:if test="not(self::GalleryPhoto)"> <tr> <td colspan="3" onMouseOver="this.bgColor='#e9e5e1'" onMouseOut="this.bgColor=''"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </td> </tr> </xsl:if> </xsl:for-each>
hide node in menu based on doc type
hello!
i have a gallery node type with alias "GalleryAlbum". when opening that node this will show the doc type nodes with alias "GalleryPhoto". I dont want these "photo nodes" showing up in my menu and i dont want to hardcode to hide the nodes based on the id, as i might want to create several galleries. any thoughts appreciated.
regards/ mac
i seemed to have worked it out myself.
<xsl:if test="not(self::GalleryPhoto)">
#code to show menu html#
</xsl:if>
although i wanted to get the GalleryPhoto-check in the first line, but didnt manage to do it. any thoughts to get in in the first line instead of another xsl test?
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1' and @level = '3']">
<xsl:if test="not(self::GalleryPhoto)">
<tr>
<td colspan="3" onMouseOver="this.bgColor='#e9e5e1'" onMouseOut="this.bgColor=''">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</td>
</tr>
</xsl:if>
</xsl:for-each>
Hi m,
You can include the DocType filter like this:
<xsl:for-each select="$currentPage/*[@isDoc][@level = 3][not(self::GalleryPhoto)][not(umbracoNaviHide = 1)]"> <tr> <td colspan="3" onmouseover="this.bgColor='#e9e5e1'" onmouseout="this.bgColor=''"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName" /> </a> </td> </tr> </xsl:for-each>
/Chriztian
Thank you, that fixed it.
/ Marcus
is working on a reply...