Imagine you are in a navigation component in WCM, but you want to ignore pieces of content in an specific level of your navigator (for example ignore contents only on the second level) and display them in another level (for example, show the contents only in the third level), well, by default the navigation component has a parameter called “Show Content” which can be used to include ALL the content recursively, but it is not possible neither ignore nor show contents.
Following is an example about how to use the plugin ifNotEqual in IBM WCM 8:
<!-- Applying WCM plugin to ignore content based on the authtemplatename property (Ignore contents with Authoring Template = "Landing Page") -->
[Plugin:ifNotEqual value2="Dashboard Landing Page" value1="[Property context='autofill' type='content' field='authtemplatename']"]
<a href='[URLCmpnt context="autofill" type="sitearea" mode="current"]'>[Property context="autofill" type="sitearea" field="title"]</a>
- The plugin ifNotEqual requires two parameters: value1 and value2. In this example, we have value1=”Dashboard Landing Page” and value2=”[Property…]”.
- When WCM renders this HTML with meta-tags will compare value1 and value2 in orden to see if both are not equals, in case of true, the HTML will be rendered, otherwise no HTML will be generated.
I hope you find useful this information and you use in your next WCM implementation, and remember, be happy with your code!