Score:0

Is there a block visibility condition for entity types?

cn flag

By default, Drupal core's node module provides a "Content type" visibility condition for node content types.

Is there a similar "Entity type" visibility condition to restrict block visibility by entities?

It seems like an obvious use case, so I tried searching but haven't been able to find anything-- it seems there's no such thing in core itself, or in Ctools, or in the Block Visibility Conditions contrib module.

4uk4 avatar
cn flag
It is, first it was in Ctools and then moved to core. However, the entity type needs to have bundles to be recognized by this plugin. The visibility condition in the node module is deprecated by the way.
4uk4 avatar
cn flag
About the use case, I think most people would use the canonical entity path, for example `/user/*`, if they don't need to filter a specific bundle.
I sit in a Tesla and translated this thread with Ai:

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.