Mattia Del Franco
Member
This works in message_macros template
HTML:<xf:if is="$user.user_id == $__globals.thread.user_id">Thread starter</xf:if>
Is there a solution for the post-macros template?
This works in message_macros template
HTML:<xf:if is="$user.user_id == $__globals.thread.user_id">Thread starter</xf:if>
<xf:if is="{$__globals.forum.node_id} != XXX">
Did anyone have luck with detecting the default dynamic avatars? This would be good to have!Sites might want to show a notice to a member without an avatar, and using dynamic avatar.
Did anyone have luck with detecting the default dynamic avatars? This would be good to have!
<xf:if is="$xf.visitor.getAvatarType() == 'default'">content</xf:if>
1. Create the widget you want to show in that thread with no position set.Hi there, I have read all the comments and everything but still haven't figured out how to add a widget to a specific thread, say thread number 5662
Any help?
Thanks
<xf:if is="$context.thread.thread_id == 5662">
<xf:widget key="widget_key" />
</xf:if>
Put the widget in a html widget and wrap it with your conditional.Is it possible to wrap a conditional statement around a complete/whole widget?
As far as I see it, if you put a conditional statement around the contents of the widget, it still shows the widget, even if there's no content to show.
I'm trying to hide certain widgets from certain usergroups if there's an easier way of doing it?!
Thank you.Put the widget in a html widget and wrap it with your conditional.
One question more, how i can show this tabbed widget only on Desktop?
<div class="deskContent">
<div class="block">
<div class="block-container">
<h2 class="widget-tabs block-tabHeader tabs hScroller" data-xf-init="tabs h-scroller" data-state="replace" role="tablist">
<span class="hScroller-scroll">
<a href="{{ link('whats-new/posts/') }}?skip=1"
class="tabs-tab is-active"
role="Threads mit den meisten Likes"
aria-controls="tab_lastest_threads">Threads mit den meisten Antworten</a>
<a href="{{ link('whats-new/posts/') }}?skip=1"
class="tabs-tab"
id="most_liked_threads"
role="tab">Threads mit den meisten Likes</a>
<a href="{{ link('whats-new/profile-posts/') }}?skip=1"
class="tabs-tab"
id="most_liked_postst"
role="tab">Beiträge mit den meisten Likes</a>
<a href="{{ link('whats-new/profile-posts/') }}?skip=1"
class="tabs-tab"
id="Most_viewed_threads"
role="tab">Meist gelesene Threads</a>
</span>
</h2>
<ul class="tabPanes widget--tab">
<li class="is-active" role="tabpanel" id="Threads_with_more_replies">
<xf:widget key="Threads_with_more_replies" />
</li>
<li role="tabpanel" aria-labelledby="most_liked_threads">
<xf:widget key="most_liked_threads" />
</li>
<li role="tabpanel" aria-labelledby="most_liked_postst">
<xf:widget key="most_liked_posts" />
</li>
<li role="tabpanel" aria-labelledby="Most_viewed_threads">
<xf:widget key="Most_viewed_threads" />
</li>
</ul>
</div>
</div>
</div>
<xf:css>
.widget-tabs {
overflow: hidden;
.tabs-tab {font-size: 13px;}
}
.widget--tab .block-minorHeader {display:none;}
</xf:css>
@media all and (min-width: 800px) {
.deskContent {
display:block;
margin: 0 auto;
}
.phoneContent {
display:none;
}
}
Seriously? Put a widget inside a widget?Put the widget in a html widget and wrap it with your conditional.
View attachment 170829
Yes, that works, you need to uncheck all the positions and put them to the html widgetSeriously? Put a widget inside a widget?
Surely that'll just show the widget again?
I'm trying to hide the widget from certain usergroups.
We use essential cookies to make this site work, and optional cookies to enhance your experience.