Merge branch 'master' of https://figureslibres.io/gogs/bachir/drupal-rorschach
Bachir preprocess code for book depth
This commit is contained in:
+2
-1
@@ -6,7 +6,7 @@
|
|||||||
/web/themes/contrib/
|
/web/themes/contrib/
|
||||||
/web/profiles/contrib/
|
/web/profiles/contrib/
|
||||||
/web/libraries/
|
/web/libraries/
|
||||||
composer.lock
|
#composer.lock
|
||||||
# Ignore sensitive information
|
# Ignore sensitive information
|
||||||
/web/sites/*/settings.php
|
/web/sites/*/settings.php
|
||||||
/web/sites/*/settings.local.php
|
/web/sites/*/settings.local.php
|
||||||
@@ -42,3 +42,4 @@ node_modules/
|
|||||||
/web.config
|
/web.config
|
||||||
|
|
||||||
/web/.vscode/*
|
/web/.vscode/*
|
||||||
|
.vscode/*
|
||||||
|
|||||||
Generated
+14203
File diff suppressed because it is too large
Load Diff
@@ -18,19 +18,15 @@ function rorschach_preprocess_html(&$variables) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// function rorschach_preprocess_node(&$variables){
|
function rorschach_preprocess_node(&$variables){
|
||||||
// $node = &$variables['node'];
|
$node = &$variables['node'];
|
||||||
// $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
$variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
||||||
// if($node->gettype() == "actualite") {
|
if($node->gettype() == "book") {
|
||||||
// $actu_type = $node->get('field_actu_type')->getString();
|
$book = $node->book;
|
||||||
// $variables['attributes']['class'][] = 'actu-type-' . $actu_type;
|
$variables['attributes']['class'][] = 'book-depth-' . $book['depth'];
|
||||||
// }
|
}
|
||||||
// if($node->gettype() == "offre_de_service") {
|
|
||||||
// $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
|
||||||
// $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
function rorschach_preprocess_field(&$variables) {
|
function rorschach_preprocess_field(&$variables) {
|
||||||
$node = \Drupal::routeMatch()->getParameter('node');
|
$node = \Drupal::routeMatch()->getParameter('node');
|
||||||
|
|||||||
Reference in New Issue
Block a user