url button tout voir dyamique
This commit is contained in:
@@ -223,6 +223,8 @@ function eql_preprocess_views_view_unformatted(array &$variables) {
|
||||
if ($node->hasField('field_type_de_ressource') && !$node->get('field_type_de_ressource')->isEmpty()) {
|
||||
foreach ($node->get('field_type_de_ressource')->referencedEntities() as $term) {
|
||||
$label = $term->label();
|
||||
$tid = $term->id(); // <-- on récupère l'ID
|
||||
|
||||
$label_ascii = $transliterator->transliterate($label);
|
||||
$type_class = 'type-' . Html::cleanCssIdentifier(strtolower($label_ascii));
|
||||
|
||||
@@ -230,6 +232,7 @@ function eql_preprocess_views_view_unformatted(array &$variables) {
|
||||
if (!isset($slides[$type_class])) {
|
||||
$slides[$type_class] = [
|
||||
'label' => $label,
|
||||
'tid' => $term->id(),
|
||||
'rows' => [],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user