Browse Source

fixing popsu.theme bug 2

bach 1 year ago
parent
commit
1154485f92
1 changed files with 2 additions and 2 deletions
  1. 2 2
      web/themes/custom/popsu/popsu.theme

+ 2 - 2
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);
       }
     }
   }