Conditional Statements

Conditional Statements

rdn

Well-known member
#28
Code:
<xen:if is="{$visitor.is_admin} AND {$visitor.is_moderator} AND {$visitor.message_count} < 5">
Content
</xen:if>
 

Bram

Well-known member
#31
How many sticky threads do you have?

Most forums usually only have a few so the ad_thread_list_below_stickies will work for that.
I am using that ad slot mostly but it looks very ugly one 2nd, 3rd etc pages when there are no sticky topics to display.

Is there a way to only show content under a sticky just on the first page of a forum?
 
#34
Is there a way to target the entire resource manager without having to do a bunch of ORs?

So this is how the code looks like now:

<xen:if is="{$contentTemplate} == 'resource_index' OR 'resource_description'(etc...)">
 

bart

Active member
#39
I was thinking of doing this to check if someone is a member of usergroup 8, but it doesn't work because $user.secondary_group_ids is not an array:

Code:
<xen:if is="in_array(8, {$user.secondary_group_ids},)">
 
YES!
 
<xen:else/>
 
NO!
 
</xen:if>
Is there any way I can do this?

it's for the member_view-template.
 
Top