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
After alot of trials, i have done the obvious and translated the whole block for different languages with each property condition as follows: ->propertyCondition('langcode', 'en...
How to get the current page language?
Thanks so much! It's working now: I was able to transfer the docroot files to the containing directory without the need for a second database or any manual configuration export/import/sync...
Backup & Migrate Config: There was a problem creating field...database table with the name already exists.
Ah, I see. Sorry, I hadn't clicked the link and assumed it was the instructions for upgrading from Drupal 7. If you are simply copying a site from one location on a server to another, the...
Backup & Migrate Config: There was a problem creating field...database table with the name already exists.
Thanks for the quick reply, laryn. No features, no Drupal: I built the source site in Backdrop in a subdirectory of the target directory under the same user home directory on the same...
Backup & Migrate Config: There was a problem creating field...database table with the name already exists.
This doesn't sound right -- when the upgrade completed, did you export the post-upgrade configuration into the staging folder (and commit that to the repo if you are using a git-based workflow...
Backup & Migrate Config: There was a problem creating field...database table with the name already exists.