Does anyone know how to export block that exists in two or more regions into yaml file?

This is the scenario I'm facing. A 'sitebranding' block is placed onto header and footer regions. When I go to admin/config/development/configuration/single/export I can find proper configuration, however when the code is being generated I can see there is a region property and the value is 'header' although in Drupal UI it's placed in footer and header. Is there a was to include both of regions for particular block?

Drupal 8 block are not exported.. it will show broken block.. You need to do split configuration and ignore configuration.. You need to add again that block into that region.

The short answer is no.

The simplest way to get what you need is to create two unique blocks and simply export both YAML files. This method will make adding any styling or configuration differences down the line much easier anyway.

Per question #9677 there were some problems with doing this in Drupal 7 but thankfully the block system is pretty robust in Drupal 8.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.