Score:0

Blocks activated on Article content type

us flag

My website has heading blocks that appear for certain pages and (as expected) I have to specify that each heading block should only appear for /node/xxxx.

I have an Events content type, which are all articles. I would like to have a specific header block show up only for Events, if possible. I will have many, many events and would like to automate that process (if possible.)

I have not yet found a module that does this and searches only bring up programmatic solutions to putting articles inside blocks (which is the opposite of what I want.)

I'm wondering if there is a code that I could adapt/use to do this. If not, I am not sure whether I should be trying to do this in javascript, php or twig... so any pointers would be helpful.

Kevin avatar
in flag
Blocks already do this. Specify their visibility by content type, not by url paths.
us flag
Thank you for pointing that out. I haven't had to use that feature for anything else yet and overlooked it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.