XF 2.2 Show widget only in position on home (forum default) page

Fionn

Member
I want to show a widget in the "Forum list: Above nodes" position but only on the home page. I have tried to add a display condition to accomplish this but so far I have not been successful.

What display condition would I add to get this to work?
 
Forum Overview - Top seems to do it for me.

This is a sample gallery slide... on my Forum landing page (yes, it's also shown in the sidebar as it was a test of positions I was doing on an existing widget). Then you can see it doesn't show up in Resources or when I punch further down the Forum categories.

Screen Shot 2023-08-20 at 4.30.28 PM.png

Screen Shot 2023-08-20 at 4.27.07 PM.png

Screen Shot 2023-08-20 at 4.27.28 PM.png
 
Thanks for the suggestion, Tracy. However for me, the widget will still show on category pages as well as that home page if I check Forum Overview - Top. I only want it to show on the home page.
 
Thanks for the suggestion, Tracy. However for me, the widget will still show on category pages as well as that home page if I check Forum Overview - Top. I only want it to show on the home page.
When you say "home" page.... are you talking about the Forum view (as exampled in the first image)... or do you have an actual landing page using a page node and the Index page route?
Reason I asked is that example only showed on my sites Forum List Main Page, but as shown, did NOT show in any of the categories (as shown in the last image).
I created a new widget for use and did not use any of the built in... are you using by chance a built in widget?
Maybe try [data-template = "forum_list"] in the display condition?
 
When you say "home" page.... are you talking about the Forum view (as exampled in the first image)... or do you have an actual landing page using a page node and the Index page route?
Reason I asked is that example only showed on my sites Forum List Main Page, but as shown, did NOT show in any of the categories (as shown in the last image).
I created a new widget for use and did not use any of the built in... are you using by chance a built in widget?
Maybe try [data-template = "forum_list"] in the display condition?
Tracy, I am referring to the Forum List view/page as the "home" page. The widget is a custom widget.

I tried "data-template = "forum_list"" in the display condition but that produced an error and would not save. As suggested in a comment below, I also tried "$template == 'forum_list'". That would save but it then the widget did not appear on the Forum List page or any other page. It seems like this is getting close but maybe there is still an issue with how to refer to the Forum List page.
 
$template == 'forum_list'
Andy, I tried "$template =='forum_list'" in the display condition. However, then the widget did not display on the Forum List view/page or any other page. It seems like this is getting close but maybe there is still an issue with how to refer to the Forum List page.
 
I want to show a widget in the "Forum list: Above nodes" position but only on the home page.
Forum list is your "home" page - default/landing page. The widget position "Forum List: Above Nodes" should work just fine for that. You don't need any conditional statements.

Or do you use New posts page as your default page?
 
I checked in the default style and it is happening with that style as well. I also checked to make sure that I don't have two locations selected or two active widgets. Strange.
 
It can only be one of a few things - the widget has been defined in multiple locations, it has been manually added to a specific template, a third party add-on or style is involved.
 
Top Bottom