restreint carrousel ressourece
This commit is contained in:
@@ -51,6 +51,8 @@ function eql_preprocess_node(&$variables){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function eql_preprocess_page(array &$variables) {
|
||||
$node = \Drupal::routeMatch()->getParameter('node');
|
||||
if ($node instanceof \Drupal\node\NodeInterface && $node->bundle() === 'ressource') {
|
||||
@@ -70,6 +72,18 @@ function eql_preprocess_page(array &$variables) {
|
||||
}
|
||||
}
|
||||
|
||||
function eql_preprocess_block(array &$variables) {
|
||||
// Vérifie si on est sur une page node de type 'ressource'
|
||||
$route_match = \Drupal::routeMatch();
|
||||
$node = $route_match->getParameter('node');
|
||||
|
||||
if ($node instanceof \Drupal\node\NodeInterface && $node->bundle() === 'ressource') {
|
||||
$variables['is_ressource_page'] = TRUE;
|
||||
}
|
||||
else {
|
||||
$variables['is_ressource_page'] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function eql_preprocess_field(&$variables) {
|
||||
|
||||
Reference in New Issue
Block a user