Hi All!

I am trying to use colorbox in conjunction with Drealty, which facilitates downloading mls listings from a RETS server.

Each listing has fields associated with it, like Asking Price, Address, and Photos. The for each listing the photo field has from 0 to 40 images. I use Views and Exposed Filters to create search functionality for the end user. One of the fields the View displays is photos.

Regardless of the gallery type I select, all the images on a page of the view get put in the same gallery. "No gallery" works as one would expect. I thought "per post" was exactly what I was looking for, and failing that, the "per field per post" should work since there is only one image field per post.

I've looked at the documentation and I do not understand how to use the "custom gallery" option. Any help is welcome.

If you would like to see what I am talking about, http://174.120.22.91/~mgriebe/test-view.

Best,
Michael

Comments

frjo’s picture

Can you switch to "per post" setting for the test view? I guess you have experimented with the custom option now.

What the gallery setting does is setting the "rel" attribute of the image links. All image links with the same "rel" value will be grouped in to a gallery by the Colorbox plugin.

frjo’s picture

Category: feature » support
mgriebe’s picture

Hi! Sorry for the delay in reply. I moved on to other more burning issues. I tried the per post setting. I just turned gallery off in the end. It works on a different site I am using, so I think it has to do with the entity I am using. Where should I look (in terms of documentation) to find how to set the "rel" attribute in views? Do I rewrite the output or something?

Best,
Michael

mgriebe’s picture

Well, I cannot get this to work. The Custom Gallery will not allow me to use tokens. so I have reverted to no gallery. If anyone has ideas, an example of my setup can be found here (you may need to scroll to see images). When I do use per post or per page or per field, it groups all images, regardless of listing. Individual listings work, and are set to per post. But, if I render listings in a colorbox (using colorbox trigger), the image gallery goes across all listings on the page again.

Suggestions?

patrickx’s picture

It seems I had the same problem, but finally stumbled across a solution:

I have a node type consisting of a text field and a multi value image field. In a view the texts of the nodes are shown with a text link to the gallery of the corresponding images. For the images the option was set to "Gallery per node". For the colorbox-trigger "Automatic generated Colorbox gallery" was activated. Colorbox then used two rel-attributes, one for the complete gallery on the page with "gallery-[viewname]" and grouped the galleries inside with rel="gallery-[node-id]". The effect was that with each link colorbox opened the corresponding gallery in a scrollable window and provided a pager to switch to the other galleries. A cool feature! But it confused the users who thought they would switch to the next image with the pager.

In order to get the default behaviour of showing only one gallery at a time after clicking the link I added the node-id as a field (no display), disabled "Automatic generated Colorbox gallery" and rewrote the trigger (the text link) as a link with this path:

<a class="colorbox colorbox-inline" rel="gallery-[node:nid]" href="/de?width=800px&height=600px&inline">

Now the colorbox trigger appears as a popup with the first image and the gallery starts with a click. The only thing left is whether it's possible to skip the popup and start the gallery directly.

HTH,
Patrick

frjo’s picture

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