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

Page nodes and template conditionals

Discussion in 'Styling and Customization Questions' started by Lee, Mar 19, 2013.

  1. Lee

    Lee Well-Known Member

    I'll try and make this simple, but i'm not the most articulate of people.

    I want to take the url portion of a page node and apply a conditional to it in the main page_container.

    IE, if I am on page_1 or page_2 then display some html.

    I need to be able to define multiple pages in the same conditional if possible, maybe up to 5 or 6. Is this possible?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    dwdmadmac likes this.
  3. Lee

    Lee Well-Known Member

    Cheers, Brogan! Big help.

    I'm loving how flexible this system actually is - especially as it looks so basic.
     
  4. Lee

    Lee Well-Known Member

    Right, I have another conditional question.

    I want to add a block of content to the page_container template, but I only want it to display on the forum index. Is this possible with conditionals?
     
  5. Lawrence

    Lawrence Well-Known Member

    Code:
    <xen:if is="{$contentTemplate} == 'forum_list'">
    The above is what I use for displaying data on the forum index page only.
     
    Lee likes this.
  6. Lee

    Lee Well-Known Member

    Thanks. I thought I had tried that, but it didn't work before. Maybe I might a typing error.

    :)
     
  7. Lawrence

    Lawrence Well-Known Member

  8. Brogan

    Brogan XenForo Moderator Staff Member

  9. Lee

    Lee Well-Known Member

Share This Page