Skip to main content
NiCE KnowledgeKnowledge
NiCE Knowledge Success Center

Display content only on a page with specific tag

Applies to:
All versions
Role required:
Draft Contributor
Conditionally display content only when a specific tag exists on a page.
  1. Open a page in Edit Mode.
  2. Select Style > DekiScript from the Editor toolbar.
  3. Copy the following code:
    if ( map.contains(page.tags,"mytag") ){
    "This text is only displayed if a page contains the tag listed above."
    }
    
  4. Paste the code into the DekiScript block.
  5. Replace mytag with your desired tag.
  6. Replace the text within the curly brackets.
    The conditional content can include CSS, HTML, or standard text.

Double quotes should only appear at the beginning and end of the conditional content. Double quotes within the conditional content will cause an error.

  • Was this article helpful?