bandeau zoom home

This commit is contained in:
2023-07-12 15:25:34 +02:00
parent 89b01643de
commit a1cb4f5561
7 changed files with 244 additions and 52 deletions
+8 -1
View File
@@ -56,12 +56,19 @@ function eql_preprocess_layout__threecol_25_50_25(&$variables) {
$variables['content']['top_bottom'] = []; /////// déclare les nvx array
$variables['content']['top_right'] = [];
$variables['content']['top_left'] = [];
$variables['content']['top_bottom_left'] = [];
foreach ($variables['content']['top'] as $key => $value) {
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_region" || $value['#derivative_plugin_id']=="node:field_adresse") {
$variables['content']['top_bottom_left'][] = $variables['content']['top'][$key];
unset($variables["content"]["top"][$key]);
}
if($value['#derivative_plugin_id']=="node:field_type_de_moa" || $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];
unset($variables["content"]["top"][$key]);
}
// foreach ($variables['content']['top_bottom'] as $key => $value) {
// }
if($value['#derivative_plugin_id']=="node:title" || $value['#derivative_plugin_id']=="node:field_equipe" || $value['#derivative_plugin_id']=="node:field_incube"){
$variables['content']['top_right'][] = $variables['content']['top'][$key];
unset($variables["content"]["top"][$key]);