XF 1.5 Widget in specail Node

kelle67

Well-known member
Hi,

is it possible to show a widget only in a special Node.

I thought I could do it with conditional statements like that.

<xen:if is="{$forum.node_id} == x">
This content will show in forum x
<xen:elseif is="{$forum.node_id} == y" />
This content will show in forum y
<xen:elseif is="{$forum.node_id} == z" />
This content will show in forum z
</xen:if>


But I do not know how to get the widget in there.
secondaryContent widget sidebar-widget WidgetFramework_WidgetRenderer_Threads" id="widget-41
 
Ok, i find a way.
I create a new hook and use it together with conditional statement.

<aside class="uix_mainSidebar">
<div class="inner_wrapper">
<div class="sidebar">
<xen:if is="{$forum.node_id} == 12">
<xen:hook name="reise">
</xen:hook>
</xen:if>

<xen:hook name="page_container_sidebar">
<xen:include template="ad_sidebar_top" />
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
{xen:raw $sidebar}
<xen:include template="ad_sidebar_bottom" />
</xen:hook>

</div>
</div>
</aside>
 
Last edited:
Top Bottom