Skip to content

Drupal Blocks

I need to... Guide
Understand the 4-layer block architecture Block System Architecture
Decide between block plugin, content block, or inline block Block Type Decision Matrix
Create a custom block plugin with code Creating Block Plugins
Add configuration options to my block Block Configuration Forms
Control who can see my block Block Access Control
Implement proper caching for performance Block Caching Strategies
Create custom block types with fields Custom Block Types
Work with content block entities Content Block Entities
Place and configure blocks via UI or code Block Placement & Configuration
Use or create visibility conditions Visibility Conditions
Theme and render blocks Block Rendering & Theming
Programmatically load, create, or place blocks Programmatic Block Operations
Use Layout Builder inline blocks or field blocks Layout Builder Integration
Find what core block plugins are available Core Block Plugins Reference
Inject services into my block plugin Dependency Injection in Blocks
React to block events or alter block output Block Hooks & Events
Export block config or use in recipes Config Management & Recipes
Use SDC components or UI Patterns as blocks SDC Component Blocks
Follow best practices and patterns Best Practices
Avoid common mistakes and anti-patterns Anti-Patterns & Common Mistakes
Ensure security and performance Security & Performance
Find key classes and interfaces Code Reference Map