This commit is contained in:
@@ -42,6 +42,15 @@ function popsu_preprocess_field(&$variables){
|
||||
if ($element['#field_name'] == 'field_texte') {
|
||||
$variables['attributes']['class'][] = 'crop';
|
||||
}
|
||||
if($element["#field_name"] == "field_programme"){
|
||||
|
||||
foreach ($variables["items"] as $id => $item) {
|
||||
$item['attributes']['class'] = new Attribute();
|
||||
$c = $item['content']['#options']['entity']->nid->getString();
|
||||
$item['attributes']->addClass("programme-".$c);
|
||||
// kint($variables["items"]);die();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user