Skip to content
Snippets Groups Projects
Commit 92a15123 authored by Eric Bremner's avatar Eric Bremner Committed by Kevin Paxman
Browse files

ISTWCMS-4866: adding class to content section so that we can target non layout pages

parent 3295c7ee
No related branches found
No related tags found
1 merge request!50ISTWCMS-4866: adding class to content section so that we can target non layout pages
......@@ -145,6 +145,19 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
$variables['classes'][] = 'layout';
$variables['classes'][] = 'uw-contained-width';
}
if ($route_name == 'entity.node.canonical') {
// Get the current path.
$parts = explode('/', \Drupal::service('path.current')->getPath());
// If the last in the array parts is not layout,
// add a class so that we traget anything but
// the layout pages.
if (end($parts) !== 'layout') {
$variables['classes'][] = 'not-layout-page';
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment