theme modale etape

This commit is contained in:
Valentin
2024-09-11 19:53:18 +02:00
parent c2d8eb99cf
commit ebb3ceb6d5
6 changed files with 270 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
<?php
use GuzzleHttp\Psr7\Uri;
/**
* @file
* Functions to support theming in the caravane theme.
@@ -27,6 +27,14 @@ function caravane_preprocess_html(&$variables) {
*/
function caravane_preprocess_page(&$variables) {
if (\Drupal::service('path.current')->getPath() == '/node/2') {
// Fetch content from the homepage.
// $homepage_url = \Drupal::service('path.current')->getPath();
$base_url = \Drupal::request()->getSchemeAndHttpHost();
$uri = new Uri($base_url);
$homepage_content = \Drupal::httpClient()->get($uri);
$variables['homepage_content'] = $homepage_content->getBody();
}
}
/**