Ability to hide theme regions and set page width on page-by-page basis

Created on 13 May 2024, 5 months ago
Updated 31 May 2024, 4 months ago

Problem/Motivation

1. We need ways to hide the Breadcrumbs, Page title, and Sidebar on a page-by-page basis.

2. We need a way to hide "Content Above" region that contains the lazy-built Drupal "Local Tasks" block.

3. We need a way to specify the page width on a page-by-page basis, to add the appropriate rvt-container class at the page template level.

Proposed resolution

1. The theme should check for presence of specially named fields that may be added to any entity type in order to hide the breadcrumb, page title and sidebar:

bool: field_hide_breadcrumb_location
bool: field_hide_sidebar
boo: field_hide_title

2. Since Drupal often renders blocks even when they're technically empty due to the Lazy-Builder feature used by some blocks, we need a pure CSS approach to hiding theme regions that are empty using the :empty CSS pseudo-class.

3. The theme should check for presence of a specially named field that may be added to any entity type in order to override the default page width:

id: node.field_page_width
field_name: field_page_width
type: list_string
allowed_values:
  -
    value: rvt-container-sm
    label: 'Details Page (small)'
  -
    value: rvt-container-md
    label: 'Details Page (medium) [Default]'
  -
    value: rvt-container-lg
    label: 'Details Page (large)'
  -
    value: rvt-container-xl
    label: 'Details Page (x-large)'
  -
    value: rvt-container-fullwidth
    label: 'Landing Page (edge-to-edge)'

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

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

Comments & Activities

Production build 0.71.5 2024