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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

camoa’s picture

The 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.

camoa’s picture

camoa’s picture

Status: Active » Needs review

Setting the needs review.

camoa’s picture

Version: 7.x-1.0-beta8 » 7.x-2.x-dev
saltednut’s picture

I am working on this module right now @camoatech. :)

I have also seen this issue using Fences. Will check this out.

camoa’s picture

Hey Brant!!! That works using a template for the gallery, I wanted something more professional though, but not there yet :)

camoa’s picture

Resending 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.

camoa’s picture

FileSize
5.41 KB
svenarajala’s picture

Thanks 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.

dernetzjaeger’s picture

In 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.

erwangel’s picture

ivnish’s picture

Status: Needs review » Closed (outdated)