<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and @nodeType != '1134' and string(umbracoNaviHide) != '1']">
which works fine, however i now want to exclude another document type from the select, so i have done the following:
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and @nodeType != '1134' and @nodeType != '1177' and string(umbracoNaviHide) != '1']">
Whaqt happens now is that it does not exclude the second document type and for some reason it now also does not exclude the first document type.
exclude multiple nodetypes from foreach
Hi i have the following select
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and @nodeType != '1134' and string(umbracoNaviHide) != '1']">
which works fine, however i now want to exclude another document type from the select, so i have done the following:
<xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and @nodeType != '1134' and @nodeType != '1177' and string(umbracoNaviHide) != '1']">
Whaqt happens now is that it does not exclude the second document type and for some reason it now also does not exclude the first document type.
I am using the latest umbraco version.
Thanks !
Hi Cookie Monster,
I'd rewrite that to something like this:
* Find the ancestor (or self) at level $level,
* take its child documents that are not hidden,
* which are not any of the nodeTypes 1134 or 1177
Instead of using the @nodeType attribute, it would actually be much clearer to use the Aliases of said document types, e.g.:
/Chriztian
Thanks Chriztian, it was exactly what i was looking for.
is working on a reply...