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

What am I getting wrong with this basic code?

Discussion in 'Styling and Customization Questions' started by Chris Radford, Apr 24, 2015.

  1. Chris Radford

    Chris Radford Member

    Code:
    <xen:if is="{$message.position} == {$xenOptions.messagesPerPage} - 1 OR {$message.position} == {$thread.reply_count}">
       <!--AD CODE HERE -->
    </xen:if>
    I'm aware the above will show an advert underneath the last post of each page. I am trying to modify it to only show to the visitors usergroup, using {$visitor.user_id} but wherever I place it, it causes a line code error and the threads do not display.

    Where am I messing up? All help is greatly appreciated.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If you are having trouble adding it to the xen:if, you can wrap the whole thing in another xen:if.

    Code:
    <xen:if is=...
    <xen:if is=...
    ...
    </xen:if>
    </xen:if>
     

Share This Page