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

XF 1.2 Can I access the name(slug) of a forum while in that forum?

Discussion in 'XenForo Questions and Support' started by Razasharp, Dec 15, 2013.

  1. Razasharp

    Razasharp Well-Known Member

    Is there any way I can access the name of a forum/node when on the forum view page or while in one of its threads?

    So if I was viewing this thread, which is inside the XenForo Questions and Support' forum, I would like to get the last part of the url, i.e 'xenforo-questions-and-support.25/'

    Or is it possible just to get the name, then call a paramaterize type method on it to churn out a URL-friendly string?

    I don't need the full url, just the last bit, because I need to link off-site to a section elsewhere.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try using $forum.node_name.

    FYI, if you add {xen:helper dump, $forum} to the forum_view template, a full list of params will be output.
    Razasharp likes this.
  3. Razasharp

    Razasharp Well-Known Member

    Awesome, thanks!

    Btw, is there a dev mode or other setting which automatically gives info such as which variables are accessible, or which templates are being used per page?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Razasharp likes this.
  5. Razasharp

    Razasharp Well-Known Member

    Brilliant, thanks - that's very helpful :)

Share This Page