Reusable Blocks
One of the powerful benefits of using a content management system like Drupal is the ability to reuse the blocks available on the site, but reusing your blocks can mean a couple different possibilities:
Block Reuse via Page Layout
Each time you use Layout Builder to place the block, it creates a duplicate of the block, which allows you to change its region placement.
Create a new block that will appear on one or more pages.
- Using the Layout Builder on a page, select Add Block.
- In the configuration side bar select Create Content block.
- Choose a block type from the list.
- Select Create reusable block.
- Configure your block content and save the block.
- Save layout.
- The block will now appear in the Content block section when you want to add it to another page.
Re-use an already configured and populated block.
- Using the Layout Builder on a page, select Add Block.
- In the configuration side bar expand the Content block section.
- Choose your block from the list. Note: If you have a long list, you can use the filter field to help narrow the list.
- Save layout.
Block Reuse via Block Layout
This is ideal if the block will always be re-used in the same region regardless of which page displays it.
You can use the block's Page Visibility section to list all the pages where this block should be used.
- Using the admin menu: select Structure > Block Layout.
- Click Place Block in the region you want the block to appear.
- Use the Filter to locate your block.
- Under Visibility select Pages. You can set visibility on an even more granular level in the Pages section. You can list a single page, several pages, all pages sharing a particular path. Enter ONE page per line. Examples:
- single page: /about-us
- multiple pages:
/about-us
/contact
/news
/staff
- all pages in a path: /news/*
- Select the visibility option: Show for the listed pages or Hide for the listed pages. You can show the block on the listed page(s) or show the block on everything except the listed page(s).
- Click Save block in this window.
- Scroll to bottom of the page and click Save blocks.
Related: Learn more about reusable blocks with our tutorial Understanding Blocks.