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

IF conditionals, Variable name list

swatme

Well-known member
#1
hi

Below is a list of variable names that can be used in IF conditionals

variable name of post position is = {$post.position}
variable name of members user id = {$visitor.user_id}
variable name of moderator = {$visitor.is_moderator}
variable name of admin = {$visitor.is_admin}

can anyone list whats the variable name for category?
or also anyone can show how to know the variable name of a specific section?
 

Jake Bunce

XenForo moderator
Staff member
#2
can anyone list whats the variable name for category?
or also anyone can show how to know the variable name of a specific section?
What page/template are you working with? That would affect what variables are available. If you can explain what you are trying to accomplish then I can find code for you.

The variables available to each page are defined in the controller. See this thread.