callage des élément dans la page de ressources
This commit is contained in:
@@ -25,20 +25,9 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
||||
$variables['rows'][$id]['attributes'] = new Attribute();
|
||||
$c = $variables['rows'][$id]['content']["#row"]->nid;
|
||||
$variables['rows'][$id]['attributes']->addClass("popsu-node-".$c);
|
||||
//kint($variables['rows'][$id]['content']["#row"]->nid);
|
||||
}
|
||||
}
|
||||
// else{
|
||||
// if ($view->current_display == "block_1") {
|
||||
// $rows = $variables['rows'];
|
||||
// foreach ($rows as $id => $row) {
|
||||
// $variables['rows'][$id]['attributes'] = new Attribute();
|
||||
// $c = $variables['rows'][$id]['content']["#row"]->nid;
|
||||
// $variables['rows'][$id]['attributes']->addClass("popsu-node-".$c);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/* implements template_preprocess_region() */
|
||||
@@ -48,23 +37,9 @@ function popsu_preprocess_region(&$variables) {
|
||||
if (isset($variables['region'])) {
|
||||
$variables['attributes']['class'][] = $variables['region'].'_container';
|
||||
}
|
||||
// if ($variables['region'] == 'footer_bottom_right') {
|
||||
// if ($node = \Drupal::routeMatch()->getParameter('node')) {
|
||||
// $t = $node->getType();
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// function popsu_preprocess_field(&$variables){
|
||||
// $v = $variables;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// function popsu_theme_suggestions_views_view_alter(array &$suggestions, array $variables) {
|
||||
// $v = $variables;
|
||||
// $suggestions[] = 'views_view__headerView';
|
||||
// }
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_block().
|
||||
@@ -75,7 +50,7 @@ function popsu_preprocess_views_view_fields(&$variables){
|
||||
$entity = $variables['row']->_entity;
|
||||
if($entity->hasField('field_programme')){
|
||||
$target_id = $entity->get('field_programme')->getString();
|
||||
// kint($variables);die();
|
||||
//kint($variables['row']);die();
|
||||
// $variables['row']['attributes'] = new Attribute();
|
||||
// $variables['row']['attributes']->addClass("pouet-node-".$target_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user