Skip to content

Views row class #208

Closed
Closed
@soniktrooth

Description

@soniktrooth

Seriously, why does this code exist? I've had to remove it or override it from every Kalatheme site I've worked on.

function kalatheme_preprocess_views_view(&$variables) {
  $view = $variables['view'];

  // Add a .row class to wrap .views-row.
  $variables['view_content_class'] = 'view-content';
  if ($view->style_plugin->plugin_name != 'list') {
    $variables['view_content_class'] .= ' row';
  }
}

This is adding a row class to every View that is using the list display, however in every case I've come across there is already a row wrapping the view and it makes things hang out in the margins.

I can see it being useful in some very specific use cases but it seems an odd thing to be included in Kalatheme.

@pirog do you have any context on this? If not I'm going to nuke it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions