XF 2.3 Widget position

Hi,

We want to place a widget "above all content", but i can't find out how to do it.

1.webp



There is no "standard" widget position for it in Xenforo, but does someone have a code i can place somewhere so it can be moved?

Regards
Bob
 
We want to place a widget "above all content", but i can't find out how to do it.
One way to do it would be to use the advertising locations.

Create your widget, then take note of the widget_key, then create a new advertisement location (Admin > Setup > Advertising)

Title: Widget All Pages (or whatever)
Position: Container Content: Above
HTML: <xf:widget key="widget_key" /><br/>
You can also set usergroups and display order, then activate the "advertisement"

Or, you can place your <xf:widget key="widget_key" /> code somewhere in the PAGE_CONTAINER template, probably just after <div class="p-body-content">

I'd probably use the advertising location myself.
 
Last edited:
Do you know how to fix this?
Oops, sorry. I totally misread your request. My brain is stupid sometimes, the all part of your post registered as all pages for some reason that only my brain will know.

If you want to keep the code in the PAGE_CONTAINER template you could wrap the code in a conditional,

<xf:if is="$template == 'forum_list'"><xf:widget key="widget_key" /></xf:if>

Or you could place <xf:widget key="widget_key" /> at the very start of your forum_list template

I'm assuming (here's another dumb brain moment) placing the widget at the Forum List: Above nodes, with it set at 0, on the widget page isn't the desired location of the widget?
 
Back
Top Bottom