Use Drupal theme regions in some slots for GCDS header

Created on 16 April 2025, 12 days ago

Problem/Motivation

The Header component in GCDS defines slots for:

  • banner
  • menu
  • search

If these slots were exposed as regions on the Block Layout page, site builders could add blocks in a familiar and flexible way. This would allow for:

  • Configuring which menu appears in the main navigation using block settings
  • Controlling menu visibility per page
  • Adding alerts or messages to the banner region
  • Replacing the search slot with a custom or contributed search block

Proposed resolution

  • Define the banner, menu, and search slots as theme regions accessible from the Block Layout page
  • Use the gcds-top-nav component for Drupal's main menu output
  • Replace the default Drupal search block output with the GCDS search component
  • Add a dependency on the UI Suite module β†’ so components can be placed via the block system

User interface changes

  • Remove the theme settings for top navigation, as this functionality will be handled via blocks

Clean-up

While making these changes, clean up unused theme regions. For example:

  • Auxiliary menu is currently defined but not used in any templates
✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada crow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024