Commit 7f448d5a authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4487: adding extra class for uw-pages

parent 6771eeaf
......@@ -109,6 +109,21 @@ function uw_sites_all_page_attachments(array &$page) {
}
}
/**
* Implements template_preprocess_html().
*/
function uw_sites_all_preprocess_html(&$variables) {
// Get the arguments of the URL and separate into parts.
$args = explode('/', \Drupal::service('path.current')->getPath());
// If the last argument is layout, we are on a layout page,
// so set the variable to true.
if (!in_array('dashboard', $args)) {
$variables['attributes']['class'][] = 'uw-page';
}
}
/**
* Implements template_preprocess_block().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment