Outstanding, thank you for this.I always use following in templates to see which variables exist in the current context:
Code:{{dump(vars())}}
Outstanding, thank you for this.
Hello everyone,
Quick question, what rule should I use if I want to show content in the Resources section but only in specific categories (let's say 3 and 5)
<xf:if is="in_array($resource.resource_category_id, [3, 5])">
show content
</xf:if>
MaybeI'm looking for a way to hide the Like button in posts that are from a specific member. So that this member cannot get any likes.
Is it possible with conditional statement?
<xf:if is="$post.user_id == 'user-id'">
could work. I'm looking for a way to hide the Like button in posts that are from a specific member. So that this member cannot get any likes.
Is it possible with conditional statement?
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
<xf:if is="$post.user_id !=2">
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
</xf:if>
<xf:if is="!in_array($post.user_id, [2,3,4])">
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
</xf:if>
<xf:if is="!$post.User.isMemberOf(20)">
<xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />
</xf:if>
Works perfectly. Thank you so much.Simple replacement template modification for post_macros.
I use AMS by @Bob and try to get an conditional statement for widget. The created widget should only shown in one category.
I tried different ways but it doesn't work. What can i do?
$containerKey == "amsCategory-18"
$xf.reply.containerKey == "amsCategory-18"
IWhy doesn't it show in the post thread page of this particular node (105)?
View attachment 222914
View attachment 222915
View attachment 222909
View attachment 222912
If I remove the xf tag, it will show.
View attachment 222911
View attachment 222913
I
Try, $__globals.forum.node_id == 105
<xf:if is="$__globals.forum.node_id == 74">
Show content.. haha
</xf:if>
What would be the template conditional to show content inside the first post of every thread in a specific node only?
{{ bb_code($post.message, 'post', $post) }}
<xf:if is="$post.isFirstPost() AND $thread.node_id==12">
First post in specific node id : 12
</xf:if>
$0
We use essential cookies to make this site work, and optional cookies to enhance your experience.