|
@@ -29,6 +29,7 @@ function eql_preprocess_node(&$variables){
|
|
$type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
|
$type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
|
$variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
|
$variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -41,26 +42,22 @@ function eql_preprocess_field(&$variables) {
|
|
$type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
|
$type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
|
$variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
|
$variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
|
}
|
|
}
|
|
- if ($field_name == 'field--name-field-type-de-moa'){
|
|
|
|
- $type_de_moa = $node->get('field--name-field-type-de-moa')->getString();
|
|
|
|
- $variables['attributes']['class'][] = 'filtre-projet-' . $type_de_moa;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+////////////
|
|
|
|
+
|
|
function eql_preprocess_layout__threecol_25_50_25(&$variables) {
|
|
function eql_preprocess_layout__threecol_25_50_25(&$variables) {
|
|
$node = \Drupal::routeMatch()->getParameter('node');
|
|
$node = \Drupal::routeMatch()->getParameter('node');
|
|
- $type = $node->gettype();
|
|
|
|
-
|
|
|
|
- if($type == "projet"){
|
|
|
|
- $variables['content']['top_bottom'] = [];
|
|
|
|
|
|
+ // $node = &$variables['node'];
|
|
|
|
+ // $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
|
|
|
+ if($node->gettype() == "projet"){
|
|
|
|
+ $variables['content']['top_bottom'] = []; /////// déclare les nvx array
|
|
$variables['content']['top_right'] = [];
|
|
$variables['content']['top_right'] = [];
|
|
$variables['content']['top_left'] = [];
|
|
$variables['content']['top_left'] = [];
|
|
foreach ($variables['content']['top'] as $key => $value) {
|
|
foreach ($variables['content']['top'] as $key => $value) {
|
|
- // // tu fais ce que tu as a faire
|
|
|
|
- if(isset($value['#base_plugin_id']) && $value['#base_plugin_id']== 'entity_field'){
|
|
|
|
- $t = 't';
|
|
|
|
|
|
+ if(isset($value['#base_plugin_id']) && $value['#base_plugin_id']== 'entity_field'){ ////// isset pour voir si existe && si oui fait ce que tu as à faire. $Value c'est l'attribut
|
|
if($value['#derivative_plugin_id']=="node:field_type_de_moa" || $value['#derivative_plugin_id']=="node:field_adresse"|| $value['#derivative_plugin_id']=="node:field_type_de_projet" || $value['#derivative_plugin_id']=="node:field_etape_du_projet") {
|
|
if($value['#derivative_plugin_id']=="node:field_type_de_moa" || $value['#derivative_plugin_id']=="node:field_adresse"|| $value['#derivative_plugin_id']=="node:field_type_de_projet" || $value['#derivative_plugin_id']=="node:field_etape_du_projet") {
|
|
$variables['content']['top_bottom'][] = $variables['content']['top'][$key];
|
|
$variables['content']['top_bottom'][] = $variables['content']['top'][$key];
|
|
unset($variables["content"]["top"][$key]);
|
|
unset($variables["content"]["top"][$key]);
|
|
@@ -78,6 +75,11 @@ function eql_preprocess_layout__threecol_25_50_25(&$variables) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// function eql_preprocess_views_row_plugins(&$variables){
|
|
|
|
+// $t = 't';
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
//////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
// function eql_preprocess_input(&$variables) {
|
|
// function eql_preprocess_input(&$variables) {
|