aehsan
(Akbar Ehsan)
February 26, 2026, 3:45pm
1
Hello,
I am using exclude_tag widget parameter but it does not seem to work.
Here is our code:
<widget type="tags">
<arg id="clean_markup">true</arg>
<arg id="group">me</arg>
<arg id="only_starred">false</arg>
<arg id="exclude_tag">Contributors</arg>
<arg id="format"><p><a href="%%xphp_group_directory%%/news/?tag={title_clean}">{title_clean}</a> - <a href="/live/json/news/group_id/37/tag/{title_clean}">(JSON Feed)</a> - <a href="/live/rss/news/group_id/37/tag/{title_clean}">(RSS Feed)</a></p></arg>
</widget>
In the example, we are trying to exclude Contributors tag from being listed. But it gets listed anyways. Here is the live URL you can see it on:
https://news.iu.edu/eskenazimuseum/tags/
Any thoughts?
Thanks,
Akbar
karl
(Karl Hinze)
February 27, 2026, 2:34pm
2
Hi Akbar,
It looks like the tags module doesn’t currently support exclude_tag, interesting – we can look at adding that to core, but in the meantime as a workaround you could use some XPHP <field> logic in the widget format to only generate markup only if {title} or title_clean != “Contributors”.
aehsan
(Akbar Ehsan)
February 27, 2026, 4:17pm
3
Even that does not seem to work.
<xphp content="true">
<if var="title_clean" not_matches="Contributors">
<arg id="format"><p><a href="%%xphp_group_directory%%/news/?tag={title_clean}">{title_clean}</a> - [<a href="/live/json/news/group_id/37/tag/{title_clean}">JSON Feed</a>] - [<a href="/live/rss/news/group_id/37/tag/{title_clean}">RSS Feed</a>]</p></arg>
</if>
</xphp>
</widget>
What am I missing?
Akbar
karl
(Karl Hinze)
February 27, 2026, 4:32pm
4
Hi Akbar,
<xphp checks global variables that exist page-wide—if instead you’re using it inside of a widget format to test an individual result’s format variables, you want to use <field inside of the format setting.
Something like this might be a place to start?
<arg id="format">
<field content="true">
<if var="title_clean" not_matches="Contributors"/>
<content>
...
</content>
</field>
</arg>
aehsan
(Akbar Ehsan)
February 27, 2026, 4:47pm
5
Thanks Karl. That fixed it for us.
Akbar