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

XF 1.1 Triple conditionals (xen:if and xen else at the end)

Discussion in 'XenForo Questions and Support' started by account8226, Feb 23, 2012.

  1. account8226

    account8226 Guest

    Hello, I would like to add a multiple conditional, for example :

    if forum id is 1 show this image,
    else if forum id is 2 show that other image;
    and else for any other forum (id 3,4,5,6,...) show this image.

    I tried to use xen:else / but it's hard to understand as I am French.

    Thanks you very much for your help.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    <xen:if is="{$forumId} == 1">
    Image 1
    <xen:elseif is="{$forumId} == 2" />
    Image 2
    <xen:elseif is="{$forumId} == 3" />
    Image 3
    <xen:else />
    Image for all other forums
    </xen:if>
     
  3. account8226

    account8226 Guest

    Thanks Brogan ;)
     

Share This Page