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

Backdrop compatibility #539

Open
laryn opened this issue Apr 21, 2022 · 1 comment
Open

Backdrop compatibility #539

laryn opened this issue Apr 21, 2022 · 1 comment

Comments

@laryn
Copy link

laryn commented Apr 21, 2022

I've noticed some of the styling doesn't come through on Backdrop when Shoreditch is installed. For example, when viewing a contact, the tabs do not stack on the left, as they do on Drupal 7.

I found that Backdrop does not add as many classes to the <body> by default, and adding this to the CiviCRM administrative theme's template.php goes a long way towards getting things styled as expected:

/**
 * Implements theme_preprocess_page().
 *
 */
function MYADMINTHEME_preprocess_page(&$variables) {
  $path = current_path();
  $path_parts = explode('/', $path);
  $segment = 'page-';
  foreach ($path_parts as $path_part) {
    $segment .= $path_part;
    $variables['classes'][] = $segment;
    $segment .= '-';
  }
}
@laryn
Copy link
Author

laryn commented May 4, 2022

Cross-reference: https://lab.civicrm.org/dev/backdrop/-/issues/9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant