From 1154485f9235f87969a794df5510298cef2489f7 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 3 Feb 2023 15:57:21 +0100 Subject: [PATCH] fixing popsu.theme bug 2 --- web/themes/custom/popsu/popsu.theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/themes/custom/popsu/popsu.theme b/web/themes/custom/popsu/popsu.theme index 39653a52..9db9f81c 100644 --- a/web/themes/custom/popsu/popsu.theme +++ b/web/themes/custom/popsu/popsu.theme @@ -68,8 +68,8 @@ function popsu_preprocess_field(&$variables){ if($element["#field_name"] == "field_programme"){ foreach ($element["#items"]->getIterator() as $id => $item) { $nid = $item->getValue()['target_id']; - $variables['items'][$id]['attributes']['class'] = new Attribute(); - $variables['items'][$id]['attributes']['class']->addClass("programme-".$nid); + $variables['items'][$nid]['attributes']['class'] = new Attribute(); + $variables['items'][$nid]['attributes']->addClass("programme-".$nid); } } }