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
Being on a vacation, I can't check the option to choose a time zone format in a views block. However, here is another idea: Add the field to a layout. Backdrop allows individual fields to...
How to Display Date & Time in Original and Local Time Zones
With the help of the Backdrop office hours crew, I was able to figure out a solution that works for me. I just added an explicit format setting to the long-text field before saving it,...
Is there a way to programmatically enable CKEditor5?
Have you tried adding a symlink pointing at the new location, within the ROOT/themes folder?
Refactor code
Yes, I mean something similar to Seven/Bartik/etc , but in another location. And yes, I've tried it, and it's not found. So I figured that there may have been a hook to load it or load it's...
Refactor code
Unfortunately the word" theme" is used in different ways. By "theme" do you mean the equivalent of Basis, Bartik, etc? (appearance themes). BTW, hook_theme has nothing to do with those...
Refactor code