Can someone tell me how to exclude document types from the Cogworks Flexible Navigation?
How do I allow for an array or list of document types to be excluded from the navigation?
Note: I do not want to use “umbracoNaviHide” as I want document types to be excluded, I do not want to add a true/false checkbox to my document type and then manually check them all.
Cogworks – Flexible Navigation: http://our.umbraco.org/projects/website-utilities/cogworks-flexible-navigation
Related post: Umbraco xslt navigation query
This depends on whether you are using the Razor version or the XSLT version. For XSLT, you would add a
*[name()!='MyDoctypeAlias' or name()!='MyOtherDoctypeAlias']to the “match” attribute on the nodeIterator template in the XSLT file.For the Razor version, inside the nodeIterator helper, I would define as follows: