home page
This commit is contained in:
@@ -30,7 +30,7 @@ function mathallo_preprocess_page(&$variables) {
|
||||
}
|
||||
|
||||
function mathallo_preprocess_region(&$variables) {
|
||||
if (isset($variables["attributes"]['class'])) {
|
||||
if (!isset($variables["attributes"]['class'])) {
|
||||
$variables["attributes"]['class'] = [];
|
||||
}
|
||||
$variables["attributes"]['class'][] = "wrapper";
|
||||
@@ -67,7 +67,11 @@ function parse_menu_item(&$items, $key){
|
||||
* Implements hook_preprocess_HOOK() for node.html.twig.
|
||||
*/
|
||||
function mathallo_preprocess_node(&$variables) {
|
||||
|
||||
$node_type = $variables['node']->getType();
|
||||
if (!isset($variables["attributes"]['class'])) {
|
||||
$variables["attributes"]['class'] = [];
|
||||
}
|
||||
$variables["attributes"]['class'][] = "node-type-{$node_type}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user