1. 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

Discussion in 'XenForo Development Discussions' started by EQnoble, Mar 31, 2013.

  1. EQnoble

    EQnoble Well-Known Member

    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">

  2. Chris D

    Chris D XenForo Developer Staff Member

    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 likes this.
  3. EQnoble

    EQnoble Well-Known Member

    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.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page