By JonGirard-1 on
Hi All,
Recently, I have been trying to create a view that will allow me to show a block view of the thumbnails in the entire gallery when viewing an image in the gallery. A great example can be seen at:
http://pendery.org/images/alc-celtic-v-mill-lane-817.htm
I have already wasted hours on this playing around with views, view bonus pack(grid view), and contemplate with no luck!
Any help is appreciated,
Jon.
Comments
Lists
Easiest way to do that is to create a block that contains a list view with some very high number as your limit. With the list view, you can choose your fields (thumbnail, title, etc.). It may seem counterintuitive to use a list view, but with CSS you can redefine that block's li tag as inline. This will allow your thumbnails to "flow" into the containing div.
Then assign your block to the $content region and weight it down so it appears after the real content.
Grid view and more
Hi Jon,
The grid view module in the Views bonus pack does part of what yelvington is suggesting you do. I think your example is using grid view in combination with the Thickbox module (that's the slideshow) and that's when I lose the ability to help...I setup a quick grid view and exported the code for you.
Details of how it's done
I created that site a little while ago while I was experimenting with Drupal and basically just messed about until I got what I wanted, so it's unlikely to be the most elegant solution and I can't remember everything I did. I will try to summarise the important parts though, if it will help.
I have a vocabulary called Gallery (I used to use Image Gallery but it's not actually necessary for this), each "gallery" is a term in this vocabulary and the image nodes are assigned to those terms when they are created.
I use Image Import to create the image nodes, make the Vocabulary free-tagging if you want it to appear on the Image Import Page. However, this means that Mutliple Select is always enabled, I thinks it's best to resist the temptation to add more than one term to an image node as that will add complications later. Finally ensure that this Vocabulary has a "lighter weight" than any other voacabulary that you assign to image nodes.
Create a Bonus Grid View, the argument is Taxonomy Term ID and the only field is the image (although you could add the title).
The pagers are created with Custom Pagers, create a new one, assign it to image nodes, use the view you've just created with [term-id] as the argument.
To display that view on each image (and generally mess about with the rest of the display) I use Contemplate, if all you want to do is add the view then it might be easier to create a custom node-image.tpl.php in your theme. The important bit is to get the top taxonomy term and use it as an argument for the view. I butchered a code snippet I found here somewhere
I have a suspicion that there is a much better way to do this, basically it's getting all the terms from the node and then using just the first one $tids[0] as the view argument.
Thickbox is used but only to display a hidden div containing the exif information from the exif module.
Hope this helps,
cheers
Dan