Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use the first/last grouping options and needed to wrap those groups in a div to clear floated elements in the preceding rows. The patch lets you choose to add a wrapper by stating a class for that wrapper. If you enter no class (empty by default) it won't create a wrapper.
Comment | File | Size | Author |
---|---|---|---|
#12 | 855478-12-more-wrappers.patch | 15.38 KB | hanoii |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedcan you give me a link or attach some HTML that shows this in action? (you can DM on twitter if you want to share privately.)
Comment #2
tim.plunkettNitpicked some minor coding standards/whitespace discrepancies.
Variables don't need to be explicitly set to NULL.
Looks good at first glance.
Comment #3
mason@thecodingdesigner.com CreditAttribution: mason@thecodingdesigner.com commentedSite is in dev and not online yet. I'm uploading an extract that shows the view I've applied this to. Look for:
<section class="view view-releases ">
I've got views results grouped in threes, with each grouping surrounded by
<div class="wrapper"></div>
tags.Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedMason:
Why doesn't CSS clear work for this situation?
section.view-releases .first {
clear: left;
}
Why do you specify div? Couldn't there be some other container for all your rows? (tr for example)
Comment #5
mason@thecodingdesigner.com CreditAttribution: mason@thecodingdesigner.com commentedI had items of uneven height, and
clear: left
wasn't making a consistant grid. This also allows for styling on the grouping of items. I made it a div in an effort to keep it simple. Despite this coming dangerously close to recreating tables, I wanted an element that didn't go *that* far.Comment #6
mansspams CreditAttribution: mansspams commentedyou can use ctools/panels to get panel display style and wrap different field sets in custom templates. no need for patch here unless it will be somehow easier.
Comment #7
tim.plunkettThis is in no way related to Panels/Ctools.
Comment #8
timd.mackey CreditAttribution: timd.mackey commented@tim.plunkett, your patch revision seems to have broke something, at least for me. Instead of getting one grouping div after another, I'm getting several nested groups in a row, followed by individual rows wrapped in a grouping div each.
@canaryMason, your patch appears to me to be working correctly. Thanks, I really needed this.
Comment #9
drupal a11y CreditAttribution: drupal a11y commentedIs this also possible for D7?
Comment #10
WillowDigit CreditAttribution: WillowDigit commentedThanks a lot
Applied the patch to semantic views 7.x-1.x-dev and it worked like a charm! I only had to test whether a few variables were set in order to get rid of a few undefined indexes in the event that I applied no class to the containing wrapper.
Comment #11
hanoiiI was going to submit a new issue but I think this one is completely covered by it so contributing here. Being 6.x such an old version I would just submit the patch to 7.x.
This patch introduces several improvements to the current module:
Comment #12
hanoiiSmall fix on the patch