Skip to main content

Display content only if a tag exists (SAP KC)


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


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?