• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Conditional Statements

Conditional Statements

Compatible XF 1.x versions
1.0, 1.1, 1.2, 1.3, 1.4, 1.5
The following conditional statements will only work if the variables are supported in the respective templates.
To determine whether a variable is available in a template, see this guide: Using variables in templates

Statements can be expanded using...
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
4.98 star(s) 42 ratings

More resources from Brogan

Latest updates

  1. Manipulating HTML elements using CSS

    Although it isn't possible to use conditional statements in EXTRA.css, it is possible to do...
  2. General update

    A few conditions have been added. Also, each entry has been numbered, to make it easier to...
  3. General update

    Expanded the introductory section explaining how to use xen:else and xen:elseif. Also added...

Latest reviews

Great list - I refer to this all the time when making template changes. Would be great to see it expanded.
Excellent stuff. Comes handy all the time. I do have one request though. Add some examples for conditional statements that are based on tags. For example, I had like to hide ads on threads with a particular tag! TIA.
Awesome, easy, comprehensive, super helpful, detail, to the point (what else, I don't know .. my adjective vocabulary is limited).
Great info here. Has helped me out a lot in placing ads on my forum. Easy to find what you are looking for and makes it easy to copy and past the code right in.
How would I check if a custom field is not empty in a template? Good guide but doesn't really explain that.
This was a fantastic resource before, with the addition of the Feb'15 update that covers proper handling in EXTRA.css, Brogan is entering into the realm of heroics. I can't tell you how many lost hours, headaches, and extra doses of blood pressure meds you just saved me. Thank you, and thank you again for the fantastic update.

Nearly every time I have a question, a search produces Brogan with the answer. This resource is no exception.
lot of correct information, intelligently organzied. Much can be inferred as well. Part of Broga's ongoing awesomeness. Answered several questions as soon as I saw this.
Excellent resource! I used this to restrict adSense content to certain pages and certain user groups. Even when you know WHAT you have to do, it is nice to have a resource to refer to. Thank you!
Brogan, you never fail to help people out - this helped me out with restricting adsense to certain usergroups... As always, GREATLY appreciate your work. You're a star and I REALLY appreciate your efforts/advice. Top work A+++++
Extremely helpful!