Skip to content

Block management

Almost every visible piece of an Open Intranet page outside the main content area — the header bar, the sidebar widgets, the footer columns, the search box, the “My last bookmarks” widget — is a block placed in a region. This page explains the moving parts and shows the most common admin tasks. For deep mechanics, follow the links to drupal.org.

  • Region — a slot defined by the active theme (sidebar, header, footer, primary menu, content, …). Each theme defines its own.
  • Block — a piece of UI placed in a region. A block can be a Drupal-provided thing (“Site branding”), a Views display, or a custom Block-Content entity authored in the admin UI.
  • Block layout — the page at /admin/structure/block where you see every region of the active theme and the blocks placed in each.
  • Visibility — every block has rules deciding on which pages it should appear (URL path, content type, role, language, custom block visibility group). Two blocks with different visibility can share a region without colliding.

Open Intranet runs two themes that are configured separately:

  • openintranet_theme — the front-end theme end users see.
  • gin — the admin theme (what authors and admins see while editing content).

When you open Block layout you are always editing one theme at a time — switch via the theme tabs at the top. Most front-end work happens in openintranet_theme; gin is rarely customised.

Regions in the Open Intranet front-end theme

Section titled “Regions in the Open Intranet front-end theme”

The front-end theme openintranet_theme defines 24 regions. Roughly grouped:

GroupRegions
Top headertop_header_logo, top_header_user_actions, top_header, top_header_form
Headerheader, header_form
Navigationprimary_menu, secondary_menu
Above contentpage_top, highlighted, featured_top, breadcrumb
Maincontent, sidebar_first, sidebar_second
Below contentfeatured_bottom_first, featured_bottom_second, featured_bottom_third
Footerfooter_first, footer_second, footer_third, footer_fourth, footer_fifth
Page bottompage_bottom

You can see them visually by visiting /admin/structure/block/demo/openintranet_theme — Drupal renders each region with its name overlaid, so you know exactly where a block will appear before placing it.

Region demo page showing every region of openintranet_theme with its name overlaid in yellow

Open Intranet ships with a sensible default block layout. A few highlights from openintranet_theme:

BlockRegionWhat it does
Site brandingtop_header_logoLogo + site name in the top bar
Search form (wide)top_header_formGlobal search input
Help Deskheader_formHelp / contact link
Main navigationprimary_menuTop-level menu
Dropdown Languagetop_header_user_actionsLanguage switcher
User Notificationstop_header_user_actionsBell icon with mention / kudos / must-read counts
User account menutop_header_user_actionsProfile / sign-out dropdown
New office bannerfeatured_topSite-wide announcement banner
Knowledge Base booksidebar_firstKB navigation when on a KB page
My Last Bookmarkssidebar_firstUser-specific bookmarks widget
Your last pagessidebar_firstRecently-read content widget
Highlighted linkssidebar_firstQuick links curated by admins
Events Main Blocksidebar_secondUpcoming events
Example Blocksidebar_first, sidebar_secondPlaceholder for editors to replace
Latest user commentscontentActivity stream entry
Informationfooter_firstCompany info column
Quick Linksfooter_fourthFooter navigation column
Legal & Compliancefooter_thirdPrivacy / terms / cookie links
Footer Infofooter_fifthAddress / branding

You can rename, move, hide or remove any of these from /admin/structure/block. The defaults are a starting point — most production sites end up swapping at least the “Example Block” placeholders, the Highlighted links and the footer columns.

This describes how you place an existing block (already created or provided by a Drupal module) in a region.

  1. Go to Structure → Block layout (/admin/structure/block).
  2. Pick the region you want, click Place block at the right.
  3. Search by block name (e.g. “Recently read content” or “Powered by Drupal”).
  4. Click Place block.
  5. Configure visibility: which pages, content types, roles, languages should see it. Leave empty to show on every page.
  6. Save.

Create a custom block (reusable content snippet)

Section titled “Create a custom block (reusable content snippet)”

Use a custom block when you want to author HTML once and reuse it across multiple regions or pages — banner with announcements, contact info, image + paragraph teaser.

  1. Structure → Block layout → Custom block library (/admin/structure/block-content).

  2. Add custom block, pick the type (Basic block by default), enter title and body, save.

    This creates a reusable Block-Content entity — it does not place it on the page yet.

  3. Go to Block layout, find your block under “Place block” → Custom blocks, place it in the region you want.

  4. Editing the block content later updates it everywhere it is placed.

Most “what’s new” / “popular” / “my X” widgets in Open Intranet are Views blocks — generated from a View configured in the admin UI. Examples already on the site include views_block:bookmarks-block_1 (“My Last Bookmarks”) and views_block:events_blocks-block_1 (“Events Main Block”).

To add your own:

  1. Structure → Views (/admin/structure/views), open or create a View.
  2. Add a Block display under Displays.
  3. Configure the query (filters, sort, fields, format), save.
  4. Now go to Block layout and place it like any other block. It appears under the View’s name with the display ID as suffix.

Views blocks are the right tool whenever the content of the widget should be dynamic (the latest 5 events filtered by department, the top 10 most-read KB pages this week, all open Ideas tagged “innovation”…). For static HTML, prefer custom blocks.

Group blocks by visibility (Block Visibility Groups)

Section titled “Group blocks by visibility (Block Visibility Groups)”

Open Intranet ships block_visibility_groups. It lets you define a group with shared visibility rules (e.g. “show only on KB pages, only for the Editor role”) and assign multiple blocks to that group at once. Useful when you have 5–10 blocks that should appear together on a context.

  1. Structure → Block visibility groups, create a group with the rules you want.
  2. When placing a block, pick the group from the “Block Visibility Group” setting in addition to (or instead of) per-block visibility rules.

Drag-and-drop in /admin/structure/block to reorder within a region or move between regions. Set region to None (or click Disable) to hide the block without deleting its configuration — useful for blocks you may want back later.

You want the block to appear…Use this rule
On specific URL pathsPages condition (e.g. /news/*, <front> for the homepage)
Only on certain content typesContent type condition
Only for certain rolesRole condition
Only in a specific languageLanguage condition
On a recurring set of pages used by many blocksA Block Visibility Group
On dynamic / complex conditionsA custom condition plugin in your own module

Drupal core also ships Layout Builder, a separate page-building tool. The two coexist in Open Intranet:

  • Block layout (the topic of this page) controls site-wide chrome — header, footer, sidebars and any cross-page widget.
  • Layout Builder is opt-in per content type and lets you compose the body of a single piece of content out of Drupal blocks, custom layouts and inline content.

For the global page frame, stick with Block layout. For richly-laid-out landing pages or content-type-specific layouts, enable Layout Builder on that bundle.