theme modale etape
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user