Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
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
Comment #2
SushiKong CreditAttribution: SushiKong commentedSame here. The most I can go is add new regions but can't edit the layout builder under config.
Comment #3
Toby Wild CreditAttribution: Toby Wild as a volunteer commentedHi, 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.
Comment #4
markh_ CreditAttribution: markh_ commentedThanks 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.
Comment #5
SushiKong CreditAttribution: SushiKong commentedI 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?