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

Conditional Statements

Guide and tutorial for conditional statements using XenForo syntax

  1. Brogan
    Compatible XF 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.

Recent Updates

  1. Manipulating HTML elements using CSS
  2. General update
  3. General update

Recent Reviews

  1. nrep
    Great list - I refer to this all the time when making template changes. Would be great to see it expanded.
  2. OperaManiac
    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.
  3. abdfahim
    Awesome, easy, comprehensive, super helpful, detail, to the point (what else, I don't know .. my adjective vocabulary is limited).
  4. Huskermax
    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.
  5. LandNetwork
    How would I check if a custom field is not empty in a template? Good guide but doesn't really explain that.
  6. wcbryant
    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.
  7. Dan Allen
    Dan Allen
    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.
  8. Bonsai Coder
    Bonsai Coder
    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!
  9. Dan Hawkins
    Dan Hawkins
    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+++++
  10. Vilandra
    Extremely helpful!