XF 2.2 Manually add the widget to any template

FoxSecrets

Active member
I created an widget but I can just see it when I set the position in Appearance > Widgets.

I tried inserting the widgetpos tag directly but didn't work:

Code:
<xf:widgetpos id="my_widget" key="my_widget" />

How can I manually add the widget to any template, how to enable it?
 
I created an widget but I can just see it when I set the position in Appearance > Widgets.

I tried inserting the widgetpos tag directly but didn't work:

Code:
<xf:widgetpos id="my_widget" key="my_widget" />

How can I manually add the widget to any template, how to enable it?
I use this code and it works...

Code:
<xf:widget key="widgetkey" />

Just put that wherever you want the widget to appear, in whatever template. If you want to specify, say the sidebar, it looks like this:

Code:
<xf:widget key="forum_overview_forum_statistics" position="sidebar"/>
 
I tried that but didn't work for me. It also don't let me insert without the 'id', how did you get it?
Don't you activate anything?

Code:
<xf:widget key="widgetkey" id="widgetid" />
 
Back
Top Bottom