Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D7 upgrade for layouts should leverage settings system, instead of state system. #5289

Open
jenlampton opened this issue Oct 6, 2021 · 0 comments · May be fixed by backdrop/backdrop#3787
Open

Comments

@jenlampton
Copy link
Member

jenlampton commented Oct 6, 2021

When upgrading from Drupal 7 to Backdrop, Backdrop checks the state system to determine which layout template, and which regions, to use when placing blocks. The state system, however, is not as easy for those upgrading from Drupal 7 to leverage, as it would require a custom module that's update hooks were to execute before system_update_1025() in order to add these preferred values into the state system.

If we were to use the settings system instead, all we'd need to do in order to change the layout template used, would be to add the following to settings.php (for example):

/* Add upgrade path from theme to layouts */
$settings['upgrade_layout_name'] = 'abc';
$settings['upgrade_layout_regions'] = array(
  'header' => 'header',
  'navigation' => 'header',
  'highlighted' => 'top',
  'content' => 'content',
  'sidebar_first' => 'sidebar',
  'sidebar_second' => 'sidebar2',
  'content_top' => 'content',
  'content_bottom' => 'content',
  'bottom' => 'bottom',
  'footer' => 'footer',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment