• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Using variables in templates

Using variables in templates

Compatible XF 1.x versions
1.0, 1.1, 1.2, 1.3, 1.4, 1.5
It's not always obvious whether a variable will work in a template.

By variable, that means something like $forum, $thread, $post, etc.
These would typically be used in conditional statements, utilising the node, user, or position ID, for...
You do not have permission to view the full content of this resource. Log in or register now.
Author
Brogan
First release
Last update
Rating
5.00 star(s) 5 ratings

More resources from Brogan

Latest updates

  1. Calling Options & Style Properties in templates

    It is possible to call Option and Style Property values and settings directly in templates. In...
  2. Calling variables in phrases

    If a variable is available in a template, you can use it in a phrase which is included in that...
  3. Setting values in the container

    Although a variable may not be natively available in a template, in some cases it is possible to...

Latest reviews

I am working on a small template change that needs some variables, and it is nice to know that we can "dump" the variables if we need to. This will help much!
This guide is very helpful and clearly, that's nescessary for everyone who interested with Xenforo but don't know how to use it!
Excellent guide sir. Very well written and easy to understand. Thank you for taking the time to prepare and post it.
Thank you Brogan!
I think that basic guides like this (and more advanced ones) need to be included in an official documentation.
Brogan
Brogan
We have discussed adding stuff like this to the Help manual but on balance thought it was better off in the forum as it's more discoverable, can be found using search, and discussion can take place on the various guide threads.
Great guide! Well detailed, Very easy to understand, look forward using it with further developments.
Brogan
Brogan
Glad you found it useful and thanks for taking the time to review.