<xsl:param name="currentPage"/> <xsl:param name="maxDeep" select="99"/> <!-- Input the documenttype you want here --> <xsl:variable name="documentTypeAlias" select="string('Category Home Page')"/> <!-- Change this to root menu node - ie Home --> <xsl:variable name="source" select="1046"/>
<!-- recursive calling of same template for childs --> <xsl:if test="count(./descendant::node) > 0 and (./@level - $startLevel) < $maxDeep"> <xsl:call-template name="drawNodes"> <xsl:with-param name="parent" select="."/> <xsl:with-param name="startLevel" select="$startLevel"/> </xsl:call-template> </xsl:if> </li> </xsl:for-each> </ul>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
I tested that this worked by checking the Hide Page? (umbracoNaviHide) checkbox on a few of the nodes and they duly did not appear in the menu. Good. The problem then, is that after unchecking the box for these nodes, they do not reappear in the menu!! I have cleared caches and republished the entire site. I have even deleted the nodes and recreated them with the same result. I have also deleted and recreated the macro. When I check the umbraco.config file, the nodes that are not appearing DO NOT have a value for umbracoNaviHide:
Try to use the "Save and publish" button on each specific node, eventhough your umbraco.config looks fine... Hmnn... You could also, for testing purpose, try to set the "data [@alias='umbracoNaviHide']) != '1'" to 0. That way you'll know if Umbraco reads it as a 1 or nothing.
Try to delete the umbraco.config and republish the site. That should cause the umbraco.confog-file to be recreated. Check if it actually IS recreated. If not, you have a permission-problem. If it is, check the file and see if the values now are there.
OK fixed. For some reason (I have no idea why?) when I republished, the documentTypeAlias had changed in umbraco.config - I have adjusted the xslt accordingly and it's all good now.
umbracoNaviHide problem - nodes do not reappear when unchecked
Hello,
I have a problem which has me tearing my hair out! I am using an XSLT macro to generate a navigation menu which seemed to be working fine until now:
I tested that this worked by checking the Hide Page? (umbracoNaviHide) checkbox on a few of the nodes and they duly did not appear in the menu. Good. The problem then, is that after unchecking the box for these nodes, they do not reappear in the menu!! I have cleared caches and republished the entire site. I have even deleted the nodes and recreated them with the same result. I have also deleted and recreated the macro. When I check the umbraco.config file, the nodes that are not appearing DO NOT have a value for umbracoNaviHide:
What can I do to resolve this? Please help.
I am using umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657)
Many thanks,
Olly
Try to use the "Save and publish" button on each specific node, eventhough your umbraco.config looks fine... Hmnn... You could also, for testing purpose, try to set the "data [@alias='umbracoNaviHide']) != '1'" to 0. That way you'll know if Umbraco reads it as a 1 or nothing.
Try to delete the umbraco.config and republish the site. That should cause the umbraco.confog-file to be recreated. Check if it actually IS recreated. If not, you have a permission-problem. If it is, check the file and see if the values now are there.
HTH,
PeterD
Ok, this gets stranger...
I have "Save and Publish"ed every node in the site - now when I view umbraco.config, every node has:
However, now my menu has disappeared entirely!!
I have tried setting the 1 to a 0 as you suggested, - no menu (as I would expect).
However after changing it back to a 1 my menu has disappeared entirely!!
I am really struggling to understand this.
Alright. First problem solved. And now a new one. :)
What if you test your xslt in Umbraco Developer section? With the "Visualize XSLT" function... Still no good? Sounds a bit odd, indeed.
OK fixed. For some reason (I have no idea why?) when I republished, the documentTypeAlias had changed in umbraco.config - I have adjusted the xslt accordingly and it's all good now.
Thanks for your help guys : )
Hehe, jup... That's a classic too. :)
is working on a reply...