When Block Visibility Belongs on the Content, Not the Placement

Block Content Visibility

Drupal core attaches visibility to where a block is placed. On a growing class of site, that is the wrong entity, and you can tell which class you are in by three questions.

Updated on 18 November 2026 for version 1.1.0 of the module.

We maintain Block Content Visibility, with BloomIdea as the supporting organization on it. The case rests on Drupal core's own model and a public core issue.

The claim is this: Drupal core gives you two layers of block visibility and both are attached to the wrong thing for an increasingly common kind of site. For reusable content blocks on moderated or permission-split sites, visibility belongs on the block_content entity, not on the placement, and core currently gives you nowhere to put it there. That is contestable, a senior site builder will contest it, and I will give their strongest version before answering it.

The two layers core ships, and where they sit

The first layer is the condition plugin system: User Role, Request Path, Language, and whatever else core and contrib expose. The second layer is placement. When you place a block at /admin/structure/block/add/<id>, BlockForm renders those condition plugins and stores your answers on the placement, which is a block config entity. This is the right model, and a good one, when a block is placed once in one region and the rule that decides whether it appears is a property of that spot on the page.

It stops being the right model the moment the rule is a property of the content rather than the spot.

Take a single reusable block: a "VIP free shipping" promo. You place it in three regions across two themes. The rule "show this only to the VIP audience segment" is not a fact about the header, the sidebar, or the footer. It is a fact about the promo. Core makes you re-enter it on all three placements and keep them synchronized by hand forever. Change the segment and you change it in three places, or you miss one and the rule silently desynchronizes. Nothing tells you it drifted.

Now add two things that are normal on enterprise and public-sector Drupal, not exotic:

  • The block is under content moderation. You want visibility versioned with the content, so reverting a revision reverts its visibility too. Placement config is not revisioned with the entity.
  • The people who manage the block content do not have administer blocks. This is a deliberate, common split: editors own content, site builders own structure. Core's only home for visibility is the structure side, so either editors cannot set it or you over-grant a structural permission to content people to work around the model.

Duplication, revisions, and permissions are the same defect from three angles. The rule is a property of the content, and the only place core lets you store it is the placement.

What Block Content Visibility does, concretely

It adds the missing third layer: content-level visibility. It attaches a single visibility_conditions base field to block_content, a revisionable, single-value string_long field holding a JSON payload, and renders core's existing Condition Plugin UI directly on the standard block content add/edit form. The conditions are saved with each revision of the block and shared by all its translations, so a rule that differs by language is a Language condition, not a second set of rules.

They hold wherever the block layout places the block, in every region and theme. They do not hold in Layout Builder: a block placed there, inline or reusable, is not checked against them, and the form Layout Builder shows for a block does not offer them.

There is a dedicated administer block content visibility permission, so the capability follows the content-versus-structure boundary instead of breaking it, and a settings form at /admin/config/system/block-content-visibility to opt bundles in and hide noisy plugins. You install it with composer require drupal/block_content_visibility.

Two design choices carry the entire argument, and they are choices, not details.

It contributes zero new condition plugins. It is plumbing. Its value is exactly the plugins you already have enabled, core, contrib, or your own, surfaced on the entity instead of only on the placement. It adds a place to put a rule, not new rules.

It AND-combines with placement-level visibility rather than replacing it. At render time it resolves the underlying entity, builds a ConditionPluginCollection, applies per-condition runtime contexts, and returns an access result, mirroring how core's own BlockAccessControlHandler already works, with the block's cache tag and each condition's cache contexts carried on the result. Placement visibility still works and still means what it meant. Content visibility is an additional gate that travels with the content. A block shows only if both layers allow it. That coexistence is the answer to the main objection.

The strongest objection: placement-level is correct by design

A senior site builder will push back immediately, and the strong form is right on its own terms. Binding visibility to the entity is wrong because the same reusable block legitimately should be able to behave differently in different placements. The footer instance and the sidebar instance are not the same situation, and the placement is exactly where that difference belongs.

I agree with that completely, and it is why the module AND-combines instead of overriding. Per-placement difference stays on the placement, correctly modeled. The claim is narrower and harder to refute: there exists a class of rule that is invariant across every placement of a block because it is a fact about the content, and core gives you no entity-level place to express it, so you are forced to duplicate it across placements or push the content's own logic into structure config. The module adds the missing layer for the invariant rule and leaves the per-placement layer untouched for the variant one. Both are needed. Core ships only one.

The other objection: core issue #2916876 will handle this

The canonical answer to "I need block visibility that Layout Builder respects" is core issue #2916876, "Add visibility control conditions to blocks within Layout Builder." State its status with the same precision I am asking for my own side. It was opened on 17 October 2017. It is priority Major. It is still "Needs work." Its fork had new commits in October 2026 and it has an open merge request against main, so it is alive, not abandoned. Its own problem statement is that Layout Builder introduced a new placement paradigm without a visibility mechanism, which is a real gap and a serious effort to close it.

It is not a substitute for this layer, and the reason is architectural, not who ships first. By design, #2916876 stores conditions on the Layout Builder component. It therefore covers Layout Builder placements only, and the rule lives on the layout, not on the block_content entity. It does nothing for blocks placed through the block layout, and it does not version the rule with the content, because the layout is not the content. If it lands, it will be the correct fix for the variant, per-component case inside Layout Builder.

The concession runs the other way too. Block Content Visibility does nothing inside Layout Builder today. Layout Builder decides whether to render a block by asking the block plugin for access, which for a content block is the view access of the entity, and the module evaluates its conditions in hook_block_access(), which runs only for blocks placed through the block layout. A condition saved on a block that Layout Builder places is ignored there, and that is issue #3594776 in our own queue. The two cover different layers and today they do not overlap: #2916876 is about the component inside a layout, this module is about the content block wherever the block layout places it. Neither is a reason to wait for the other, and after nine years the core issue is not a thing you can build against today.

Adjacent contrib has the same shape of mismatch. Block Visibility Groups groups blocks under shared site-admin conditions, a site-administration tool with a different permission audience that does not make a rule travel with one piece of content. Block Visibility Conditions contributes extra condition plugins but does not move where conditions are stored. None of them put the rule on the entity.

The decision rule

This is the useful part, and you can apply it without installing anything. For any block visibility rule you are about to configure, ask:

  • Is this rule the same for every placement of this block, or does it differ by spot on the page? Same everywhere points to content. Differs by spot points to placement.
  • Is the block under content moderation, and should reverting a revision revert its visibility? Yes points to content.
  • Do the people who set this rule have administer blocks, or only content permissions? Content-only points to content.

If you answered "placement" to the first and the rest do not apply, core already serves you and you do not need this module. If the block is placed with Layout Builder, you do not need it either, because it does nothing there yet. If you answered "content" to the first or yes to either of the others, and the block is placed through the block layout, core has no native home for the rule and you are choosing today between manual duplication, a structural permission over-grant, or rules that desynchronize. That gap is where Block Content Visibility belongs, specifically on moderated, governance-heavy Drupal, which is also, in fairness, the kind of site BloomIdea is paid to build, and not as a default everywhere. It is at version 1.1.0, covered by Drupal's security advisory policy, for Drupal 10.3 and later and Drupal 11, and it does not reach Layout Builder, which is worth knowing before you put it on production rather than after.

Core's placement model is not wrong. It is incomplete in a direction that matters more every year, as Drupal sites get more moderated and stricter about the editor-versus-site-builder boundary. The missing piece is small, it is the right layer, and the layer is the entity, because the entity is where reuse, revisions, moderation, and editorial ownership already live. Putting the rule anywhere else is putting it next to the data instead of on it.


José Fernandes is the founder of BloomIdea, a Drupal and AI agency based in Braga, Portugal. He is the author of Digital Marketing with Drupal (Packt, 2022), with a foreword by Drupal creator Dries Buytaert, and is completing a PhD on human-AI collaboration in organizational contexts at the University of Minho.