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.
One of the mmodules that is increasingly being used is the fences module to clean Drupal output a little bit. But sionce media gallery uses the field-items class i their CSS the gallery grid does not work when the fences module is active.
Creating a special class that replaces field-items class from media gallery and using this in the CSS file for the grid should be enough, I can do this, the question is... I don't see work since December 2012, is there still work going on in this module? will patches be applied?
Actually I am just curious, I'll submit the patch when is ready.
Comment | File | Size | Author |
---|---|---|---|
#8 | fences-and-media-gallery-2075581-7.diff | 5.41 KB | camoa |
#2 | fences-and-media-gallery-2075581-1.patch | 16.23 KB | camoa |
Comments
Comment #1
camoa CreditAttribution: camoa commentedThe problem was the dependency of media_gallery with the default field-items and field-tem classes.
I created a new template to load the media-gallery-file field and netbeans reformatted some spaces and stuff like that(configured to respect drupal standards).
This problem showed when using fences, or any module/theme that changed the default behavior. Including the Zurb-foundation theme.
Comment #2
camoa CreditAttribution: camoa commentedComment #3
camoa CreditAttribution: camoa commentedSetting the needs review.
Comment #4
camoa CreditAttribution: camoa commentedComment #5
saltednutI am working on this module right now @camoatech. :)
I have also seen this issue using Fences. Will check this out.
Comment #6
camoa CreditAttribution: camoa commentedHey Brant!!! That works using a template for the gallery, I wanted something more professional though, but not there yet :)
Comment #7
camoa CreditAttribution: camoa commentedResending the Patch with the new changes on the latest commit.
This fixes problem with sorting and with CSS when fences, or the Zurb Foundation theme is active. Actually it fixes the problem when the field-items and field-item class are not used or are taken off by any other module cleaning up the markup.
Comment #8
camoa CreditAttribution: camoa commentedComment #9
svenarajala CreditAttribution: svenarajala commentedThanks this was a patch I needed. The media in the gallery was showing up in a single column with the size set to 1059px x 1059px. I do use fences and I'm glad that camoa shared this patch.
Comment #10
dernetzjaeger CreditAttribution: dernetzjaeger commentedIn colorbox-display.js there is
$galleries = $('.field-name-media-gallery-file');
in my case that class is named
.field--media-gallery-file
while using fences.So why won't we use
$galleries = $('.media-gallery-file-items');
instead to attach the colorbox?That worked for me and is much more independent from all those fences problematics.
Comment #11
erwangel CreditAttribution: erwangel commentedComment #12
ivnish CreditAttribution: ivnish commented