Needs review
Project:
Views Grouping Row Limit
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2010 at 19:01 UTC
Updated:
16 May 2018 at 07:22 UTC
Jump to comment: Most recent
Comments
Comment #1
theunraveler commentedI would be happy to do this. Currently, however, I am working on an actual fix to get $classes actually outputting useful data. So once I solve that bigger issue, this issue should be fixed. I will report back when I've been able to work on it a bit more.
Comment #2
tadfisher commentedHey, I fixed it.
Add to views_limit_grouping.views.inc:
In theme.inc (copied from template_preprocess_views_view_unformatted):
Comment #3
theunraveler commentedAwesome! I'll test this out and then commit it if it works. Thank you so much!
Comment #4
ndwilliams3 commentedI also needed the classes for rows. No need to add another function, just drop the copied code from theme.inc into views_limit_grouping.module.
Comment #5
mlbrgl commentedAnother (temporary) option is to use views theme overrides and call the function mentioned in the above comments:
Comment #6
Jerome F commentedI'm trying to add first and last classes to the views fields groups, how could I adapt the code in #4 4 or the suggestion in #5 to do it ? (more details in the following issue : http://drupal.org/node/1086348)
Comment #7
Anonymous (not verified) commentedIs it possible to have these classes by group like the normal group function does ?
Group 1:
class="views-row-1"
class="views-row-2"
class="views-row-3"
Group 2 :
class="views-row-1"
class="views-row-2"
class="views-row-3"
Thank you.
Comment #8
sokrplare commentedFor anyone reading this thread and trying to apply it in D7, this module has unfortunately only been half-ported to D7 so a lot of things are funky.
Best example and most obvious reason none of these (otherwise sound) pieces of advice will work - take a look at
views-limit-grouping.tpl.phpwhich is not really based on the D7 version ofviews-view-unformatted.tpl.php(http://api.drupal.org/api/views/theme!views-view-unformatted.tpl.php/7).I just needed odd and even so did a temporary hack to get that (since $zebra doesn't seem to exist anywhere, unless I'm missing something!):
OLD:
<div class="views-row views-row-<?php print $zebra; ?> <?php print $classes; ?>">NEW:
<div class="views-row views-row-<?php print $id % 2 == 0 ? 'even' : 'odd'; ?> <?php print $classes; ?>">Comment #9
sonu_dev commentedprint $classes;"print $attributes;>In the Above div tag having id and class,in which define some variables like $block_html_id; , $classes; , $attributes;. Can anyone help me out from where does these variables come from.