XF 2.2 Is there a way to use conditional statements in Notices?

Hey everyone, this is my first post in the Xenforo community forums. :) I have a question. I understand how to use conditional tags in Templates (<xf:if>). However, I am wanting to do that in Notices, so that some tools can be displayed for the mods of a given forum, in their forum header (we're using Notices for forum headers). I tried using a conditional tag there:

Code:
<xf:if is="$xf.visitor.is_moderator || $xf.visitor.is_admin || $xf.visitor.is_super_moderator">
Testing
</xf:if>

But I was able to see the text even as a guest. I'm hoping there is a way to insert content that can be shown only for moderators of that forum (as well as admins and super moderators).

My understanding of Xenforo code is rather limited, as I have been learning by example as needs arise. But I am a developer by trade so if anyone can point me in the direction of where I should be going, I would greatly appreciate it!
 
Oh good idea, for some reason that never occurred to me. Thanks! A bit of a bummer to have to maintain two separate instances of code though, I was hoping the actual HTML/CSS for the display could live in one place, and the widget for the mods could be piped in.

For reference, I am trying to develop the ability for forum mods to be able to add/remove featured threads that will display in a rotating slideshow in the forum header, so admins do not have to be involved in maintaining that (especially as we roll this feature out to all of our dozens of subforums).
 
Top Bottom