Conditional Statements

Conditional Statements

Paul B

XenForo moderator
Staff member
Brogan submitted a new resource:

Conditional Statements - Guide and tutorial for conditional statements using XenForo syntax

Conditionals

The following conditional statements will only work in templates which support the arguments and parameters.

Statements can be expanded using AND, OR, and <xen:else />.

Replacing == with != in the following examples will change the condition from true to false.
For example, <xen:if is="{$visitor.user_id} == x"> for true, <xen:if is="{$visitor.user_id}...

Read more about this resource...
 
Brogan updated Conditional Statements with a new update entry:

Making the category ID available for use in the ad_ templates

If you have pages set for categories (ACP -> Options -> Node & Forum List) you may want to utilise the category ID in the ad_ templates, to prevent ad's being shown in certain categories for example.

To do so, edit the category_view template and add the following at the top:
HTML:
<xen:container var="$category.node_id">{$category.node_id}</xen:container>

That will ensure the category ID is available for use in the ad_ templates, allowing you to use the category node ID conditional as...

Read the rest of this update entry...
 
Back
Top Bottom