|
@@ -37,13 +37,13 @@ function eql_preprocess_node(&$variables){
|
|
// $variables['elements']['#paragraph']->item_id;
|
|
// $variables['elements']['#paragraph']->item_id;
|
|
// }
|
|
// }
|
|
// la fonction suivante ne sert à rien
|
|
// la fonction suivante ne sert à rien
|
|
-function eql_preprocess_field(&$variables) {
|
|
|
|
|
|
+// function eql_preprocess_field(&$variables) {
|
|
|
|
|
|
- $paragraph = &$variables['paragraph'];
|
|
|
|
- $variables['attributes']['class'][] = 'paragraph-type-' . $paragraph->id();
|
|
|
|
- $hook_id = $paragraph->get('paragraph-id--')->getString();
|
|
|
|
- $variables['attributes']['class'][] = 'hook-id-' . $hook_id;
|
|
|
|
-}
|
|
|
|
|
|
+// $paragraph = &$variables['paragraph'];
|
|
|
|
+// $variables['attributes']['class'][] = 'paragraph-type-' . $paragraph->id();
|
|
|
|
+// $hook_id = $paragraph->get('paragraph-id--')->getString();
|
|
|
|
+// $variables['attributes']['class'][] = 'hook-id-' . $hook_id;
|
|
|
|
+// }
|
|
//might be useful for if-clause: $variables['field_name'] and $variables['field_type']
|
|
//might be useful for if-clause: $variables['field_name'] and $variables['field_type']
|
|
// if ($paragraph && $paragraph->getEntityTypeId() == 'paragraph' . $paragraph->id() ) {
|
|
// if ($paragraph && $paragraph->getEntityTypeId() == 'paragraph' . $paragraph->id() ) {
|
|
//whatever logic you need goes here, e.g. something like
|
|
//whatever logic you need goes here, e.g. something like
|