Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Views row class #208

Closed
soniktrooth opened this issue Sep 22, 2015 · 13 comments · Fixed by #255
Closed

Views row class #208

soniktrooth opened this issue Sep 22, 2015 · 13 comments · Fixed by #255
Assignees
Labels
Milestone

Comments

@soniktrooth
Copy link
Contributor

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.

@pirog
Copy link
Contributor

pirog commented Sep 22, 2015

@soniktrooth NFI.

PURGE!

@soniktrooth
Copy link
Contributor Author

I will burn it with fire.

@labboy0276
Copy link

thank goodness

@soniktrooth soniktrooth added this to the 7.x-3.3 milestone Sep 22, 2015
@pirog
Copy link
Contributor

pirog commented Sep 22, 2015

the purest death is one by fire

@soniktrooth soniktrooth modified the milestones: 7.x-3.3-new, 7.x-3.3 Sep 22, 2015
@andrewmallis andrewmallis modified the milestones: 7.x-3.2, 7.x-3.3-new Oct 12, 2015
@andrewmallis
Copy link
Member

pull request @soniktrooth ?

@soniktrooth
Copy link
Contributor Author

@andrewmallis ^^

@andrewmallis
Copy link
Member

👍

@soniktrooth
Copy link
Contributor Author

#212 wasn't enough—we need to remove the views-view.tpl as well

@andrewmallis
Copy link
Member

Well, what are you waiting for @soniktrooth an invitation?
Seriously, though, good eye.

@soniktrooth
Copy link
Contributor Author

Just an opportunity—I found this in the middle of something else so I was just commenting so I wouldn’t forget.

@amp9020
Copy link

amp9020 commented Dec 21, 2015

Hi, @soniktrooth , I'm receiving "Notice: Undefined variable: view_content_class in include() (line 55 of /sites/all/themes/kalatheme/templates/views/views-view.tpl.php) . Is this related to this post? (I saw your comment on Oct 16). For now can I remove line 55 manually or define a blank variable?

Thanks,

@soniktrooth
Copy link
Contributor Author

@amp9020 Sorry about this one—I haven't had a chance to get back to this. You can, in fact, remove the views-view.tpl.php entirely because the only customization that Kalatheme makes is the adding of that variable, which is now, of course, undefined.

@amp9020
Copy link

amp9020 commented Dec 21, 2015

@soniktrooth Even better to remove the file. That worked. Cheers! Thanks, no more messages about that in watchdog ^_^

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants