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
Just saw someone reference this thread and saw the alternative solution mentioned in Stack Exchange which linked to here. Using Nginx certainly does work if encountering the problem in Lando,...
Backdrop returns 404 error only in CiviCRM pages
The fix is to add the following to the .htaccess file Options -MultiViews and this is also discussed here in this very forum. Thanks to David at Civihosting!
'Unable to reach the server' with Backdrop but OK with Drupal 7
Ah, thank you very much! I totally forgot there is a template with an explanation...
How to write Readme.md so that module description is correctly viewed on modules page
There is a module template at https://github.com/backdrop-contrib/module_template/blob/main/README.md?plain=1, including the following information about the first README paragraph...
How to write Readme.md so that module description is correctly viewed on modules page
Figured it out: I did not set 'position: relative' for the parent, the picture. Without this the textbox will follow the page and not the parent element. Solved.
Problem w. positioning textbox