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 BamaStangGuy, Aug 15, 2013.

  1. BamaStangGuy

    BamaStangGuy 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 XenForo Moderator Staff Member

    $forum.node_id should do it.
     
    BamaStangGuy likes this.
  3. BamaStangGuy

    BamaStangGuy 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. BamaStangGuy

    BamaStangGuy Well-Known Member

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

    Jeremy XenForo Moderator Staff Member

    $forum.parent_node_id.
     
    BamaStangGuy likes this.

Share This Page