Skip to content

Backdrop compatibility #539

@laryn

Description

@laryn

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 .= '-';
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions