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

If template is forum_list

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

  1. account8226

    account8226 Guest

    Hello,

    <xen:if is="{$contentTemplate} == 'forum_list'">
    This content will show on the xyz template
    </xen:if>

    I tried that code to show a code on my forum list page, but nothing is showing up.

    How can I do that ?

    Regards.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    That looks correct.

    Which template are you placing that code into?
     
    Jake Bunce likes this.
  3. account8226

    account8226 Guest

    I added it in a custom template I made, it is doing something like :
    forum_list include taigachat include my custom template ^^

    So I guess it is why it's not working isn't it ?
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    That's probably why, yes.

    I think $contentTemplate is only available to container templates, such as PAGE_CONTAINER.

    Furthermore it probably won't pick up templates that are included by <xen:include template="" />

    If you can't get it positioned right in the PAGE_CONTAINER template you might want to consider directly editing the forum_list template.
     
    Jake Bunce likes this.

Share This Page