enleve preprocess_field parce que provoque bug sur page static

This commit is contained in:
2022-01-21 15:44:13 +01:00
parent 5275760c21
commit 504ccdaf54
4 changed files with 75 additions and 12 deletions
+10 -10
View File
@@ -32,16 +32,16 @@ function eql_preprocess_node(&$variables){
}
/**
* Implements hook_preprocess_field().
*/
function eql_preprocess_field(&$variables) {
$node = \Drupal::routeMatch()->getParameter('node');
if($node) {
$type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
$variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
}
}
// /**
// * Implements hook_preprocess_field().
// */
// function eql_preprocess_field(&$variables) {
// $node = \Drupal::routeMatch()->getParameter('node');
// if($node) {
// $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
// $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
// }
// }