Skip to main content
NICE CXone Expert

We will be updating our infrastructure on Dec 2, 2023. Sites will be down starting at 8pm Pacific time. This may last up to 3 hours.

Expert Success Center

Display content only on a page with specific tag

Conditionally display content only when a specific tag exists on a page.
  1. Open a page in Edit Mode and select Style > DekiScript from the Editor toolbar.
  2. Copy the following code and paste it into the DekiScript field, replacing mytag with your desired tag:
    if ( map.contains(page.tags,"mytag") ){
    "This text is only displayed if a page contains the tag listed above."
    }
    
  3. The text within the "{ }" curly brackets will only be displayed when a page contains the tag "mytag".

Functionality

  • The conditional content can include CSS, HTML, or standard text.
  • 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?