index page projets

This commit is contained in:
Valentin
2024-11-05 01:44:18 +01:00
parent 018960837d
commit bd1b450a45
34 changed files with 1084 additions and 382 deletions

View File

@@ -11,7 +11,6 @@
function erabletheme_preprocess_html(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for page.html.twig.
*/
@@ -47,7 +46,7 @@ function erabletheme_preprocess_node__view__meetup(&$variables) {
'nom' => "",
];
}
}
/**
@@ -61,8 +60,16 @@ function erabletheme_preprocess_region(&$variables) {
$t="t";
}
function erabletheme_preprocess_views_view(&$variables) {
$t="t";
function erabletheme_preprocess_views_view(array &$variables) {
if ($variables['view']->current_display === 'page_1') {
$block_id = 'sitesmap_block';
$block = \Drupal::service('plugin.manager.block')->createInstance($block_id, []);
if ($block) {
$block_render_array = $block->build();
$variables['custom_sites_map'] = $block_render_array;
}
}
}
/* fonctionne mais meilleure méthode avec les suggestions page--xxx */
@@ -77,7 +84,7 @@ function erabletheme_theme_suggestions_views_view_alter(array &$suggestions, arr
// $suggestions[] = 'views_view__content_gouvernance';
// } elseif (isset($view_title) && $view_title === 'Partenaires') {
// $suggestions[] = 'views_view__content_partenaires';
// }
// }
// elseif (isset($view) && $view === 'Meetup en ligne') {
// $suggestions[] = 'views_view__content_meetup';
// }
@@ -96,9 +103,12 @@ function erabletheme_theme_suggestions_views_view_alter(array &$suggestions, arr
case 'partenaires':
$suggestions[] = 'views_view__content_partenaires';
break;
case 'meetup':
$suggestions[] = 'views_view__content_meetup';
break;
case 'meetup':
$suggestions[] = 'views_view__content_meetup';
break;
case 'projets':
$suggestions[] = 'views_view__content_projets';
break;
}
}
@@ -145,4 +155,4 @@ function erabletheme_theme_suggestions_region_alter(array &$suggestions, array $
}
}
}
}