diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme index 897088edd32c868362c3735aa4198bf76f5b9dce..df37797094e3139361fce3de3191dd3de715e9a6 100644 --- a/uw_fdsu_theme_resp.theme +++ b/uw_fdsu_theme_resp.theme @@ -57,6 +57,19 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) { break; } + + // 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['attributes']['class'][] = 'not-layout-page'; + } + else { + $variables['attributes']['class'][] = 'layout-page'; + } } /** @@ -145,19 +158,6 @@ 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'; - } - } } }