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
Thanks, that was it exactly!
Admin bar doesn't work for other site admin
Hello, Thank you for your response ! We followed the steps of the documentation, so we copied the content and the themes on backdrop en then we went to the page domain/core/...
Page not found after migration
Does the Administrator role of your site have the permission "Access administration bar"? (I think, you wouldn't notice the missing permission if your own account is the so called User 1.)
Admin bar doesn't work for other site admin
I've figured it out: in hook_field_widget_form(): $html_name = array(); if (!empty($element['#field_parents'])) { $html_name[] = $element['#field_parents'][0]; foreach ($...
Using #states in custom field widget
Hi @allinappli and welcome! Just for clarity, did you already run the site updates portion of the upgrade to Backdrop? (e.g. at /core/update.php) Do you have command line access or...
Page not found after migration