By alexpott on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
You can no longer provide default theme settings in the theme's THEME.info.yml file. Defaults should be provided in the theme's THEME.settings.yml configuration file.
Before
Drupal 7 — THEME.info
settings[toggle_logo] = 1
settings[toggle_name] = 1
settings[toggle_slogan] = 1
settings[toggle_node_user_picture] = 1
settings[toggle_comment_user_picture] = 1
settings[toggle_comment_user_verification] = 1
settings[toggle_favicon] = 1
settings[toggle_main_menu] = 1
settings[toggle_secondary_menu] = 1
settings[zen_breadcrumb] = yes
settings[zen_breadcrumb_separator] = ' › '
settings[zen_breadcrumb_home] = 1
Drupal 8 — THEME.info.yml
settings:
features:
comment_user_picture: true
comment_user_verification: true
favicon: true
logo: true
name: true
node_user_picture: true
slogan: true
zen_breadcrumb: yes
zen_breadcrumb_separator: ' › '
zen_breadcrumb_home: 1
After
The theme's config/install/THEME.settings.yml file should have the following information:
features:
comment_user_picture: true
comment_user_verification: true
favicon: true
logo: true
name: true
node_user_picture: true
slogan: true
zen_breadcrumb: yes
zen_breadcrumb_separator: ' › '
zen_breadcrumb_home: 1
Impacts:
Themers
Comments
Just adding to this, if you
Just adding to this, if you want to generate one of these files for your theme automatically to place in your theme's
config/install/folder, simply export the current config and then copy the newly exportedTHEME.settings.ymlinto the folder. I just tested this and it works great.Danny Englander | Twitter | Instagram
Custom theme settings?
How does this affect custom theme settings? They used to look like this...
Before:
Drupal 7 —
THEME.infoDrupal 8 —
THEME.info.yml: Bryan
Found it
After some trial and error, I discovered that you can set custom settings in the new
config/install/THEME.settings.ymlfile... just not inside thefeaturesgroup.After:
Drupal 8 —
config/install/THEME.settings.ymlRemember you need to uninstall and reinstall to see it take effect.
: Bryan
Any idea what are other files, Eg block.block.omega_content.yml
Do you know what does above work in omega theme? I just downloaded omega theme and there are lot of files under config/install.
I have know idea how these files work and how to create newer one. Please let me know if you have any information on this.
Thanks,
Some of the world's greatest feats were accomplished by people not smart enough to know they were impossible...- Doug Larson
Is there any way around uninstall and reinstall?
The way the D8 saves all of your block configuration to the theme, when you uninstall a theme and reinstall it, you lose all block configuration in the process.
Is there any way to update the theme to see the new settings rather other than uninstalling and reinstalling?
I was able to get around this
I was able to get around this by setting another theme as the default (without uninstalling the theme you want) and then putting my theme back as the default.
In general, it might also work to export configuration and then import it after reenabling the uninstalled theme or module, but i haven't tested iths