header
This commit is contained in:
@@ -11,11 +11,10 @@ use Drupal\Core\Template\Attribute;
|
||||
|
||||
function popsu_preprocess_views_view_unformatted(&$variables) {
|
||||
|
||||
$view = $variables['view'];
|
||||
$view = $variables['view'];
|
||||
if($view->id() == "programmes"){
|
||||
$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);
|
||||
@@ -34,19 +33,14 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*$rows = $variables['rows'];
|
||||
$style = $view->style_plugin;
|
||||
$options = $style->options;
|
||||
$variables['default_row_class'] = !empty($options['default_row_class']);*/
|
||||
/* foreach ($rows as $id => $row) {
|
||||
$variables['rows'][$id] = array();
|
||||
$variables['rows'][$id]['content'] = $row;
|
||||
$variables['rows'][$id]['attributes'] = new Attribute();
|
||||
if ($row_class = $view->style_plugin
|
||||
->getRowClass($id)) {
|
||||
$variables['rows'][$id]['attributes']
|
||||
->addClass($row_class);
|
||||
}
|
||||
}*/
|
||||
};
|
||||
|
||||
/* implements template_preprocess_region() */
|
||||
|
||||
function popsu_preprocess_region(&$variables) {
|
||||
$r = $variables['region'];
|
||||
if (isset($variables['region'])) {
|
||||
$variables['attributes']['class'][] = $variables['region'].'_container';
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user