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

XF 1.2 If in category conditional

Discussion in 'XenForo Questions and Support' started by Brent W, Aug 15, 2013.

  1. Brent W

    Brent W Well-Known Member

    I would like to use a conditional inside forum_view template that will add extra text to the <title> tag if the forum is inside a certain category. Is there a conditional for me here?
     
  2. Jeremy

    Jeremy Well-Known Member

    $forum.node_id should do it.
     
    Brent W likes this.
  3. Brent W

    Brent W Well-Known Member

    That works but I'd need every id. Is there no parent variable? I have about 20-30 forums under one category and I want them all to have this extra text. I tried just using the category id but it didn't work.
     
  4. Brent W

    Brent W Well-Known Member

    Looks like I can't use category.node_id unless I enable pages for Categories. Bummer :(
     
  5. Jeremy

    Jeremy Well-Known Member

    $forum.parent_node_id.
     
    Brent W likes this.

Share This Page