The Slots module provides "slot" placeholders that can be placed anywhere on your site — via Block UI, Layout Builder, Views, Paragraphs, or directly in Twig — and lets content editors "push" content into them based on configurable conditions, without that content needing to live in your site's configuration.

Typical use cases:

  • A placeholder in a layout where editors can drop in a CTA for a specific node type
  • A piece of content in a default layout that you don't want exported to config — place a slot instead and add the content later
  • Flexible CTAs inside Paragraphs, controlled entirely by conditions
  • Content above a view that editors manage independently of the view's configuration

Features

  • "Slot" placeable via Block UI or Layout Builder, with a configurable slot identifier and cardinality
  • Content is matched to slots via the reusable conditions condition system — combine the "Slot" condition with any other condition (request path, language, role, ...)
  • Not limited to blocks — any entity type can be made slot-aware by adding a "Slots" field
  • Sub-modules for Views integration (slots_views), Paragraphs (slots_paragraphs), and Twig (slots_twig, providing a slot() Twig function)
  • Drag-and-drop weight ordering for content competing for the same slot

Requirements

Getting started

Place a "Slot" via Block UI or Layout Builder and give it a slot identifier. Then add a "Slots" field to the entity type you want to use as slot content (e.g. a block content type), enable "This content shall be displayed in slots", and add a "Slot" condition with the matching identifier — the content will now appear wherever that slot is placed.

Supporting organizations: 
Development and maintenance

Project information

Releases