XF 2.0 Display sidebar widgets on the search results page and the new messages page

Wilouness

Active member
Hello Guys
Hope i'm in the good forum !!
I want to display some of my sidebar widgets on the page wich show the results of a search and also on the page of new messages. I don't find those specifics positions in the widget settings in ACP

Thanks
 
Hello,

I think this can be usefull for you :
Widgets with no position will not appear anywhere, but you can call the configured widget instance directly in templates using the <xf:widget key="widget_key" /> syntax.

For example : <xf:widget key="forum_overview_visitor_panel" />
Key :
Screenshot_1.webp

Regards, SyTry
 
You need to put this code into your template ;)
Thanks
I did that but there was an error stopping me from saving the template because the widget key didn't exist.
Works with an existing widget key. (y)
To add a sidebar to the page, do I have to add sidebar code into the search_results template? That's messy.
 
Thanks
I did that but there was an error stopping me from saving the template because the widget key didn't exist.
Works with an existing widget key. (y)
To add a sidebar to the page, do I have to add sidebar code into the search_results template? That's messy.
I don't know. Yes you need an existing widget key ;)
 
Back
Top Bottom