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

XF condition for page ?

Discussion in 'XenForo Questions and Support' started by tafreehm, Mar 10, 2013.

  1. tafreehm

    tafreehm Well-Known Member

    I wanna include some JS and CSS code in header. But I only want it to appear at one specific page.
    can someone guide me with <xen: if> condition for page, please ?
    Thank You
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. tafreehm

    tafreehm Well-Known Member

  4. Brogan

    Brogan XenForo Moderator Staff Member

    The template for a page node is pagenode_container

    <xen:if is="{$contentTemplate} == 'pagenode_container'">
    This content will show on pages
    Jake Bunce likes this.
  5. Newt

    Newt Active Member

    Hi @tafreehm how did you manage to make it work for a specific page using the above code?
  6. EQnoble

    EQnoble Well-Known Member

    <xen:if is="{$page.node_id} == 4">
    If page node and node id is 4 include this
    Newt likes this.
  7. Newt

    Newt Active Member

    Thank you so much :notworthy:

Share This Page