js book-depht title
This commit is contained in:
@@ -28,23 +28,23 @@ function rorschach_preprocess_node(&$variables){
|
||||
|
||||
}
|
||||
|
||||
function rorschach_preprocess_field(&$variables) {
|
||||
$node = \Drupal::routeMatch()->getParameter('node');
|
||||
// function rorschach_preprocess_field(&$variables) {
|
||||
// $node = \Drupal::routeMatch()->getParameter('node');
|
||||
|
||||
$field_name = &$variables['field_name'];
|
||||
if($node) {
|
||||
// if ($field_name == 'field_type_de_protagoniste'){
|
||||
// $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
||||
// $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
||||
// }
|
||||
if ($field_name == 'block-pagetitle-2') {
|
||||
$depth_title = $node->get('block-pagetitle-2')->getString();
|
||||
$variables['classes_array'][] = 'menu-depth-' . $depth_title;
|
||||
}
|
||||
}
|
||||
// // $field_name = &$variables['field_name'];
|
||||
// // if($node) {
|
||||
// // // if ($field_name == 'field_type_de_protagoniste'){
|
||||
// // // $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
|
||||
// // // $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
|
||||
// // // }
|
||||
// // if ($field_name == 'block-pagetitle-2') {
|
||||
// // $depth_title = $node->id('block-pagetitle-2')->getString();
|
||||
// // $variables['attributes']['class'][] = 'menu-depth-' . $depth_title;
|
||||
// // }
|
||||
// // }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user