Score:0

How to simply inherit all Olivero regions into my sub-theme?

sh flag

I am trying to create a subtheme for the Olivero default theme.

My problem is that not all Olivero regions are inherited into the sub-theme.
For example, some of the regions that are missing are "Content Above" and "Content Below".

To create the sub-theme, in /web/themes I have added the following files:

globalrs.info.yml

name: globalrs
type: theme
core_version_requirement: ^8 || ^9
description: Global resources
base theme: olivero
libraries:
  - globalrs/resources

globalrs.libraries.yml

resources:
  js:
    behavior.js: {}
  css:
    theme:
      style.css: {}

How to simply inherit all Olivero regions into my sub-theme?

Jaypan avatar
de flag
Regions are not inherited by sub themes, you have to copy the regions from the parent to your theme's `*.info.yml` file, or else the default system themes are used.
alhemist avatar
sh flag
Oh, I see, well, my problem with taking that approach is my fear that the regions I have copied would suddenly become outdated (if Olivero itself would be drasticaly upgraded). That's why I seek some "version agnostic" automatic inheritance instead of declaring region by region by name.
Kevin avatar
in flag
That basically never happens.
id flag
If you are that concerned you can copy Olivero then customize it as you wish, and not be subject to breaking changes.
Jaypan avatar
de flag
I believe what cilefen describes is exactly why regions are not inherited.
alhemist avatar
sh flag
@cilefen if I copy the entire Olivero would it still be counted as a "sub-theme"?
alhemist avatar
sh flag
I think what I seek is "continuous integration" of the regions of the parent theme to the child theme. By the way, wasn't that the behavior in Drupal 7?
Kevin avatar
in flag
Again, its extremely rare for themes to add regions out of the blue, especially core themes. This really isn't a problem.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.