Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add header and footer regions from default drupal core #65

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

joelpittet
Copy link
Collaborator

@joelpittet joelpittet commented Aug 29, 2023

Problem/Motivation:
When switching from theme inheritance with a base theme of galactus to starterkit fork, the regions don't match well because galactus defined regions aren't inherited: https://www.drupal.org/docs/theming-drupal/sub-theme-inheritance

Proposed Solution:
From the default regions in core and the page.html.twig file suggests a page.header and page.footer region will exist and we should add them to the page.html.twig template and info file..

public/core/lib/Drupal/Core/Extension/ThemeExtensionList.php:26

      'sidebar_first' => 'Left sidebar',
      'sidebar_second' => 'Right sidebar',
      'content' => 'Content',
      'header' => 'Header',
      'primary_menu' => 'Primary menu',
      'secondary_menu' => 'Secondary menu',
      'footer' => 'Footer',
      'highlighted' => 'Highlighted',
      'help' => 'Help',
      'page_top' => 'Page top',
      'page_bottom' => 'Page bottom',
      'breadcrumb' => 'Breadcrumb',

The page_top, page_bottom are the only other ones in there but they get easily confused with the html.html.twig variables, so opted not to include them.

Copy link
Member

@occupant occupant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me. I've tested and found no issues

Thanks!

@occupant occupant merged commit e518ec0 into master Aug 31, 2023
@joelpittet joelpittet deleted the feature/add-default-header-and-footer-regions branch August 31, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants