Skip to main content

Display content only if a tag exists

This page applies to:MindTouch Responsive

If you want to display content only when a specific tag exists on a page, use the following DekiScript:

if ( map.contains(page.tags,"mytag") ){
    "This text is only displayed if a page contains the tag 'mytag'."

In the above example, the text in the "{ }" curly brackets will only be displayed when a page contains the tag "mytag". This content can include both CSS, HTML or standard text.