<xf:if is="$extras.xfmg_media_count">
<td><a href="{{ link('media/users', $user) }}" class="menu-fauxLinkRow-linkRow u-concealed">{$user.xfmg_media_count|number}</a></td>
<xf:else />
<td>0</td>
</xf:if>
I've been looking & looking so I'm here....
what is the conditional if a user has added xfmg media items to their profile? what I have:
Code:<xf:if is="$extras.xfmg_media_count"> <td><a href="{{ link('media/users', $user) }}" class="menu-fauxLinkRow-linkRow u-concealed">{$user.xfmg_media_count|number}</a></td> <xf:else /> <td>0</td> </xf:if>
<xf:if is="$xf.visitor.xfmg_media_count">
<td><a href="{{ link('media/users', $user) }}">{$user.xfmg_media_count|number}</a></td>
</xf:if>
Any conditionals for dates?
I would like to show content only on a certain date..
<xf:if is="$xf.time > 1599606000 AND $xf.time < 1599692400">
Your code here...
</xf:if>
48. How to show a banner only inside of only the first post of each page of a thread?
Code:<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0"> Show content.. </xf:if>
<xf:if is="!$xf.visitor.user_id">
Show only members
<xf:else />
Show only guests
</xf:if>
<xf:if is="!$xf.visitor.user_id">
Show only guests
<xf:else />
Show only members
</xf:if>
6. How can I show different content to members and guests?
Code:<xf:if is="!$xf.visitor.user_id"> Show only members <xf:else /> Show only guests </xf:if>
<xf:if is="!$xf.visitor.user_id">
Show only guests
<xf:else />
Show only members
</xf:if>
I could not found how I can make a sidenav widget to be viewed only by registered members.
$xf.visitor.user_id
<xf:if is="in_array({$forum.node_id}, [X,Y,Z])">
Show content..
</xf:if>
Doesn't work in post_macros, any idea what I can do ?
Just tried that too, but didn't workDid you try $post.node_id instead of $forum.node_id?
Just tried that too, but didn't work
Thank you so much!This worked for me: $thread.node_id
I'm trying to add conditional statement in the author_info of post_article_macro but nothing is working.This worked for me: $thread.node_id
<xf:if is="in_array({$forum.node_id}, [11,12])">
</xf:if>
<xf:if is="$xf.visitor.canStartConversationWith($post.User)">
</xf:if>
We use essential cookies to make this site work, and optional cookies to enhance your experience.