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.
Comment | File | Size | Author |
---|---|---|---|
#1 | gallery_view.txt | 10.12 KB | drewkeller |
#1 | gallery_screenshot.png | 101.84 KB | drewkeller |
Comments
Comment #1
drewkeller CreditAttribution: drewkeller commentedI 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).
Comment #2
lsolesen CreditAttribution: lsolesen commentedhttp://drupal.org/node/1333674
Comment #3
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedThis 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:
Content: Path
Content: Gallery Media
fieldv Rewrite Results
[x] Output this field as a link
[path]
(with the brackets) inLink: ____
[x]use absolute path
[x]use absolute path
andLink: ____
before[path]
as in
Link: http://www.mydomain.com/[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.http://drupal.org/project/imagecache_actions
./admin/config/media/image-styles/edit/large
, delete the current effects and add the following:(Transparent canvas is achieved by not providing any color)
Media
forFormatter
andLarge
forFile 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:You can see it working now at:
http://www.primeradama.gob.do/es/galeria
:-)
Comment #4
caspercash CreditAttribution: caspercash commentedYour link http://www.primeradama.gob.do/es/galeria 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?
Thanks!
Comment #5
Bernsch CreditAttribution: Bernsch commentedI 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:
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
Comment #6
ivnish CreditAttribution: ivnish commented