The current version of the "All galleries" page is special menu callback that alters the normal taxonomy_terms page callback. The problem is, all kinds of other modules alter this menu hook too. For example when you activate the i18n taxonomy translation module the page breaks and resets to the default state.

Why not create a default view delivered with the media_gallery module? Most of the features for replicating the current layout are already in place. Maybe the external settings from the configuration ui might work with the view.

What's missing right now are some formatters and fields, that allow you to add the image count and gallery description as seen right now (and other informations?). This should be possible by exposing those informations as "pseudo" fields and giving them their own formatters. A custom formatter would be especially important for the gallery thumbnail and it's frame and would open up the options to choose different image_styles (sizes, frames) for your galleries.

As a side effect having these informations available as fields one could add their own formatters that change the basic behaviors like choosing a certain image for the gallery thumbnail (That might be a pseudo field too).

Maybe that could work for the normal gallery page as well opening up more opportunities to alter the design and information of individual galleries by using an argument.

So what do you think? Where do you see pain points in this solution? I still have a problem with i18n right now, but maybe Views internationalization will fill the gap here.

In the end, I don't think that this view is too hard to create in a joint effort.

#1 gallery_view.txt10.12 KBdrewkeller
#1 gallery_screenshot.png101.84 KBdrewkeller
Members fund testing for the Drupal project. Drupal Association Learn more


drewkeller’s picture

101.84 KB
10.12 KB

I don't have a lot of items yet, and I'm definitely not a master of views, but I did get a view to work. Here's how.

1. Clear the path (URL alias) for the galleries page, i.e. make it blank. At Configuration > Media > Gallery settings.
2. Set the thumbnail size as desired. The default at 450x450 is too large for me. At Configuration > Media > Image styles, edit media_gallery_thumbnail.
3. Create a new view, using the Title and Gallery media fields and add Gallery type to the filter criteria. I exported mine (attached). Various settings can be adjusted by changing the format options (currently set to a grid).

lsolesen’s picture

Carlos Miranda Levy’s picture

This View works fine, except that the images link to the image not to the gallery.

In order to have the image link to the gallery:

  • add the field Content: Path
    • exclude it from display
  • choose the Content: Gallery Media field
    • expand v Rewrite Results
    • check [x] Output this field as a link
    • Enter [path](with the brackets) in Link: ____
    • Probably you should check [x]use absolute path
    • If you are using Multilingual i18n with language prefix, you will have to ...
      • Use [x]use absolute path and
      • enter your full domain in Link: ____ before [path]
        as in Link:[path]

In addition, if you want to have the same nice background of stacked images for the gallery images presentation, and are still using Media 1.0 like most of us, you will have to use one of the file displays available for image in /admin/config/media/file-types/manage/image/file-display and redefine it under image styles. The reason for this is that Views does not display custom Image Styles under Formatter options for the display of fields.

I chose large because I don't use it anywhere else.

  1. Install the ImageCache Actions module from
  2. Then go to /admin/config/media/image-styles/edit/large, delete the current effects and add the following:
    • Scale and crop 470 x 470
    • Define canvas left:40 right:40 top:40 bottom:40 Transparent under image
      (Transparent canvas is achieved by not providing any color)
    • Underlay (background) xpos:0 , ypos:0 alpha:100%. file: sites/all/modules/media_gallery/images/stack_bg.png, dimensions:background
    • Scale 220x220
  3. Then go back to your view and choose:
    • Media for Formatter and
    • Large for File View Mode

Finally, you will may also want to remove the Gallery description and rewrite the Title field to Trim it to some 30 characters or less in order to have the "columns" of the generated grid with the same widths.

To remove grid lines, use css. In my case, adding the following to my local.css did it (I had chosen a grid of 4 columns:

.views-view-grid.cols-4 tr,
.views-view-grid.cols-4 td {
  border: none; 

You can see it working now at:


caspercash’s picture

Your link isn't working and is not displaying any galleries. I also did import the views gallery_view.txt and it worked fine EXCEPT that its not draggable anymore.

Any updates to this?


Bernsch’s picture

I use media 7.x-1.2 and media_gallery 7.x-1.0-beta8
In the Contentype Gallery i add a field whith a taxonomy term Field type.
(As a replacement for the non-functioning "Gallery collection" field from the media gallery core)
The taxonomy terms are football, tennis, skiing.

And it is possible to create a page-view from any gallery with the specific terms:
Page-View from gallery with term football
Page-View from gallery with term tennis
Page-View from gallery with term skiing

Format is a Grid
Show as Content | Teaser
Filter criteria Content: Type (= Gallery) AND Content: Section (= Football)

in CSS:

.view-galleryname td {
   width: 20%;
   padding-bottom: 2em;

It works fine for me but it has only one problem: the drag and drop doesent works.
Note: i don't use/don't test the i18n taxonomy translation module

Edit: It may be that you need this view patch from #8: #1744478: Grid format disregards "number of columns" option for a single line of results