page theme et villes

This commit is contained in:
armansansd
2021-08-28 16:57:48 +02:00
parent 261da4447b
commit b81322cf65
9 changed files with 694 additions and 139 deletions

View File

@@ -26,6 +26,14 @@ function popsu_preprocess_html(&$variables) {
}
}
function popsu_preprocess_node(&$variables){
$node = &$variables['node'];
if($node->hasField('field_programme') && $node->get('field_programme')->getString() != ""){
$variables['attributes']['class'][] = 'programme-' . $node->get('field_programme')->getString();
}
}
function popsu_preprocess_field(&$variables){
$element = &$variables['element'];
if (isset($element['#field_name'])) {