I would like the change the menu setting on the header block when a user enables the Tatsu theme.
Is there any way to do that?
Here is the code I would use in hook_install for a module, is there a version of this for a theme:
$layouts = layout_get_all_configs('layout');
foreach ($layouts as $layout_name => $layout) {
foreach ($layout['content'] as $block_id => $block) {
if ($block['plugin'] === 'system:header') {
config_set('layout.layout.' . $layout_name, 'content.' . $block_id . '.data.settings.block_settings.menu', 'my-menu-id');
}
}
}
Recent comments
As for the sidebar breakpoint, check core/modules/layout/css/grid-flexbox.css. You should avoid editing the values there, as they will be overwritten next time you update core. Instead,...
Setting width for main menu showing as hamburger menu, sidebars not displayed
Have you tried editing the breakpoint at admin/structure/menu/settings?
Setting width for main menu showing as hamburger menu, sidebars not displayed
Thank you!
How to change meta name="viewport"
I think the function you actually want is hook_html_head_alter Something like: function theme_name_html_head_alter(&$head_elements){ $head_elements['viewport']['#attributes']['...
How to change meta name="viewport"
Thank you! Your quick reply was very, very much appreciated.
I have killed my site, changing the 'Public File System Path' How to fix