• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Xen If condition for addon enabled

EQnoble

Well-known member
#1
Like the title says...I want to use the state (enabled/disabled) of an addon as the basis for an if condition.

Can this be done and if so what is the proper way to use it

Something like this?
<xen:if is="{$xenAddon.addon_id} == 1">
</xen>



Thanks
 

Chris D

XenForo developer
Staff member
#2
Unfortunately, this functionality doesn't exist.

You would have to verify the active state of an add-on using a database query and pass that to the templates that need it.
 

EQnoble

Well-known member
#3
damn....as simple as the addon is that would be heavier than the rest of the addon itself lol.

I got it working by creating an option and noting to not use the enable/disable addon on/off box to disable the addon.