Need to add custom block to the topic hub page

Events happening in the community are now at Drupal community events on www.drupal.org.
gennadiy's picture

Hi guys,
We need to add custom block to the topic hub page (to each it's own) and for some reason it's not easy at all:
- block visibility restriction is not working when block is added sitewide under context - it shows up on every page;
- when added under topic hub panel content it will not show up.
Any help, please. What would be the right way of doing it?

Thanks a lot

Comments

Use context

kenyan's picture

Using context is the way to go.
Sitewide context did exactly what it is supposed to: Show up on every page.
A context that deals with the topic hubs path does not exist in OP (at least not in mine), so simply clone one of the 'listing page' context or create a new one (eg openpublish-listing_pages-blogs).
- Add a 'path' condition and set path to 'topic-hubs' or to the specific hub page (this may get cumbersome if your hubs are many).
- You could also instead pick the 'views' condition and select the 'Topic Hubs' view.
- Add a 'Reaction'. In this case block, then select your desired custom block to display.

This i believe is the simplest solution. Hope it helps.

Thank you Andrew, This is

gennadiy's picture

Thank you Andrew,
This is exactly what I did - added new context with the topic hub path and added block there. Was just about to post reply about it, but yours came first :). Thank you!

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: