Skip to main content
MindTouch Success Center

Display content only if a tag exists (TCS)

This page applies to:MindTouch 4 and MindTouch TCS

Overview

This article covers how to conditionally display content based on tagging.

Procedure

If you'd like to display content only when a specific tag exists on a page, you can 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 within the "{ }" curly brackets will only be displayed when a page contains the tag "mytag". This content can include both CSS, HTML, or standard text.

  • Was this article helpful?