Resource icon

XF 1 Tip Tutorial Understanding Conditional Statements

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,783
Points
823

Reputation:

LQD submitted a new resource:

Tutorial Understanding Conditional Statements - Understanding Conditional Statements

Conditional Statements

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

Statements can be expanded using AND, OR, xen:else and xen:elseif.

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

Where an argument only contains a single...

Read more about this resource...
 

Gunstra

Well-known member
Registered
Joined
Aug 26, 2022
Messages
53
Points
18

Reputation:

How can I display this navigation link only to admins and moderators please using the conditional display code (template style code)?
 

Attachments

  • modpanel.png
    modpanel.png
    32.5 KB · Views: 35

Jace

Collaborate
Collaborate
Registered
Joined
Aug 9, 2020
Messages
187
Points
73

Reputation:

How can I display this navigation link only to admins and moderators please using the conditional display code (template style code)?
Gunstra$xf.visitor.is_admin OR $xf.visitor.is_moderator
 
Top