Displaying text if event has a specific tag

Hi,
Based on Widget Formatting - LiveWhale Support I’ve tried to add a disclaimer to an event in a widget if a certain tag was found, but it doesn’t seem to be working. I think I’ve misunderstood the documentation. What do you think?
Here’s my widget code:

<p class="lw-widget">
  <a href="{href}" target="blank"><span class="lw-widget-date">{date}</span><br />
  <span class="lw-widget-time">{|time| }</span><br /></a>
  
  <field content="true">
  <if var="has_tag_NSODualEnrollment"/>
    <content>
      <span>This content has the tag NSODualEnrollment</span>
    </content>
  </field>
  {tags}
</p>

I think I figured it out. It looks like I need to remove the upper-case from the tag in the code, this will then match the tag and trigger the text to display. I just changed this one line and it works.
<if var="has_tag_nsodualenrollment"/>
The tag is actually NSODualEnrollment, but it needs to be converted to lower-case to match.

1 Like

Aha, great catch – yes it looks like that has_tag_ element brings everything to lower-case. Glad you were able to sort it out!