I only could find info on how to create custom layouts for Omega in Drupal version 7.8

How to accomplish this in Omega for Drupal version 8.x?

Comments

bavarian created an issue.

SushiKong’s picture

Same here. The most I can go is add new regions but can't edit the layout builder under config.

Toby Wild’s picture

Hi, not an expert, but this is how I did it.

Open up /config/install and copy the existing theme.layout.name.yml file.
Rename the 'name' area.

Open up the theme.layouts.yml file.
Add your new 'name' in there.

Open up /style/css/layout/ and copy primary-layout.css and rename it name-layout.css
Same for SCSS folder.

Clear cache.
Uninstall theme.
Reinstall and enable theme.

In your 'Layout Builder' tab you should now have a new Layout.

Select a Breakpoint group and off you go.

markh_’s picture

Thanks for the tip - it seems the only way to update the UI with changed layouts/regions is to uninstall/reinstall the theme which is a bit of a pain.

Just to add to the knowledge base, if you change the settings in the UI, it will potentially re-generate the following files so you shouldn't edit them:

config/install
  [theme].layout.[layout].generated.yml
  [theme].layout.[layout].yml

style
  css/layout
    [layout]-layout.css
  scss
    style-vars.scss
    layout
      [layout]-layout.scss

Which means you have to make config/install and style writable by the web server. Drupal specific hosting services generally don't allow you to write to disk apart from the files directory.

SushiKong’s picture

I tried to set the Bartik as default and Uninstall the sub-theme then set as default again it's giving me the "The website encountered an unexpected error. Please try again later. drupal" Error. Is there a tool we can use to show us which line of code is giving us this error?