I recently had to do some theme overrides to inject file bundle types (image, video) as a CSS class for gallery thumbnails. I think bundle/filetype classes would be helpful to others.

For example: .file-bundle-type-video or similar.

Comments

Chris Charlton’s picture

Issue tags: +CSS, +theme

One example for those who need this now. In your template.php file you will probably need to override theme_media_gallery_block_thumbnail():

function YOURTHEME_media_gallery_block_thumbnail($variables) {
  // ... 
  $classes = $lightbox ? array('media-gallery-thumb', 'cbEnabled') : array('media-gallery-thumb');
  $classes[] = $element['#bundle']; // <---- Add file/bundle type class
  $gallery_id = $element['#media_gallery_entity']->nid;
  // ... rest of the function's code...
}
ivnish’s picture

Issue summary: View changes
Status: Active » Closed (outdated)