What is a Drupal block?

A block is a piece of content or functionality that can be placed in a region of your theme, like a sidebar or footer. Blocks can be static HTML, dynamic content generated by a module, or output from a view.

Common examples include a login form, a navigation menu, a list of recent posts, or a social media widget. Blocks are managed through the Block layout page in the admin interface, where you assign them to regions and set visibility rules.

Block visibility can depend on user role, the current page, content type, language, and more. This makes blocks a flexible way to assemble page layouts without hard coding anything in the theme. Layout Builder has expanded this flexibility even further in recent versions of Drupal.

Facebook
Twitter
LinkedIn
Pinterest