Using variables in templates

Using variables in templates

Compatible XF 1.x versions
  1. 1.0
  2. 1.1
  3. 1.2
  4. 1.3
  5. 1.4
  6. 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.
Related resources


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!
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.
Paul B
Paul B
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.
Paul B
Paul B
Glad you found it useful and thanks for taking the time to review.
Back
Top Bottom