If you're familiar with XSLT you can do it by adding an if statement in a XSLT file like this:
<xsl:if test="$currentPage/@id !='1234' and $currentPage/../@id !='1234' "> CONTENT TO NOT DISPLAY </xsl:if>
Make sure that you create an associated marco when you creates XSLT file, it will happen automatically if you don´t remove the checkmark. After you created XSLT and macro then place the macro in the template where the data should appar.
It should also possible to do this in Razor, but since I don´t know which verson you´re using I don´t know if it possible for you to do it in Razor. To do it in Razor It´s require that you use at least version 4.7 if I remember right. From this version and forward the Razor engine become available.
Conditional Statement to include child nodes
I have this conditional statement working, to not display content on a specific node. But I want to include all the children of that node as well.
Hi Ryan,
If you're familiar with XSLT you can do it by adding an if statement in a XSLT file like this:
Make sure that you create an associated marco when you creates XSLT file, it will happen automatically if you don´t remove the checkmark. After you created XSLT and macro then place the macro in the template where the data should appar.
It should also possible to do this in Razor, but since I don´t know which verson you´re using I don´t know if it possible for you to do it in Razor. To do it in Razor It´s require that you use at least version 4.7 if I remember right. From this version and forward the Razor engine become available.
/Dennis
is working on a reply...