Hi,
how can I configure a block to be visible for specific content types, and for specific pages?

On the block config page, Home -> Administration -> Structure -> Block layout, I can configure the visibility for "Content types" and "Pages" separately, but these two conditions seem to be combined by an AND (which, to my understanding, does not make much sense...). I need the conditions to be OR'ed, since the block should be visible for specific content types, as well as for specific pages.

There is an old posting for this topic with respect to Drupal 5-7, "Block visible for Specific Content Type AND Specific URL", https://www.drupal.org/node/134425. But that proposes to add php coding, which probably changed with Drupal 8, apart from the problem that I don't know where to put this coding (maybe there was a "php" tab for the visibility in former Drupal versions?).

Thanks for any hints!
Tobias

Comments

Jeff Burnz’s picture

natanaugusto’s picture

This Module is really easy to manage and very useful!
Thanks for the tip!

philosurfer’s picture

if anyone stumbles upon this, the link above to demo does not work (as with the module page)

The youtube video is here: https://www.youtube.com/watch?v=ZKwkaMUbJIs

-
We are the cult of personality.
-