Is this possible using views and a colorbox trigger field?

I am close, I have one imagefield as my trigger and another multi-valued imagefield (same node) as my popup, but when colorbox pops up, the first image of my multi-valued field is repeated twice.

Anyone know of a way?

Comments

Hey mollybt,

Wow this issue has been opened for awhile. If this is still an issue for you, I am going through a similar problem. I had your issue first (mines D6) and the reason was that the ImageCache I chose for the trigger image was a type of Colorbox - ImageCache. Change this to an option that is not Colorbox related. You can keep the actual popup field the same.

But once I did this, yeah it worked, but the first image now is a combination of ALL images in the gallery so I am still stuck...

Status:Active» Postponed (maintainer needs more info)

Did any of you find a solution?

Yeah I did eventually.

You need 3 total fields, in this order:

  • Image Field (this is the trigger, so usually set to a colorbox - galleryformatter thumbnail imagecache, or some other small colorbox image cache) Exclude from display
  • Image Field (this is the pop up, should have a larger colorbox imagecache) Exclude from display
  • Colorbox Trigger (set trigger to first image field, set popup token to the second image field.

Now the key is:

  • The first image field, make sure you check Group Multiple Values, and enter Show 1 and starting from 0
  • Now the second field set to Show "leave blank" and starting from 1

You should also make sure you Colorbox setting are right as well under Site Configuration > Colorbox.

  • Image field options (CCK) - Set to Per field gallery
  • Extra settings - make sure Enable Colorbox load is set.

Component:Miscellaneous» Documentation
Assigned:Unassigned» Cyclodex
Status:Postponed (maintainer needs more info)» Active

@TravisJohnston
That is great, I just tested that on my project where I do display 6 images in a row) but the colorbox will contain even more (all) pictures.

Looks like we should add this to the documentation, it looks like this is still "to do".

I will make a suggestion, would be great you help me review this.

Is it OK when I change the Component to "documentation" ?

Assigned:Cyclodex» Unassigned
Status:Active» Needs review

What about this : Please help because my English is not the best:

Use the Views Colorbox Trigger field:
------------------------------------
With the Trigger field you can have any other field configured as a
trigger to open a colorbox. You can also display a limited amount of
content/pictures and let the colorbox show all instead.
This is an examlpe how to get one image displayed as trigger to open
a colorbox with all the images.
You need 3 total fields, in this order:
* Image field as the trigger
   - set format to colorbox
   - select your desired node image style (example: thumbnail)
   - set the colorbox image style (example: large)
   - Exclude from display
   - Configure the amount of displaying images in the "Group Multiple
     Values" (Example: Show 1 starting from 0)
* Image field which is used to complement the colorbox images
   - set format to colorbox
   - select Hide (do not display image)
   - set the colorbox image style (example: large)
   - Exclude from display
   - Configure the amount of displaying images in the "Group Multiple
     Values" (Example: Show ALL starting from 1)
* Colorbox Trigger field which will connect the two fields and display it
   - set Trigger-field to the first image field (the trigger)
   - enter the field token of the second image field into the "popup" field
     (example: [field_images_1])

What I am also thinking of is a feature which would enable this behaviour on a field level, instead using views. But I think this should be opened as a feature request (of not yet possible). And yes there are also other issues related to this feature. We should try to connect them.

you should start with what can be achieved using your description. right now the headline and first paragraph is too technical.

Hmm I documented related to the README file, so the title was already given in there...
Currently it says:

Use the Views Colorbox Trigger field:
------------------------------------
TODO

Is this meant to be added somewhere else ? My suggestion to make it less technical would be then:

Limit amount of images linking to Colorbox:
------------------------------------
The goal is to display 1 image linking to a Colorbox which will contain
all images.
....

better ? :)

ah. misunderstood where you wanted to put the text. then maybe you could create a patch

Is there also a other place where documentations of Colorbox are available ?

Here is the patch, changed it again a bit, to have both technical and none technical in it.

Optimizations are any time welcome ;)

Not work... I have followed step by step, but not work... i have colorbox 1.3, but not work... i hqave 3 field, the first is a field preview, only one image, it's my trigger, i hace an other field it's my popup, the field contain 5 images, and the field trigger colorbox... but not work... all images displaying in the popup, not agrouping by gallery...

Hello Cesabal,

Try changing your Colorbox Settings to Per Post Gallery instead of Per Field Gallery.

Travus, coiuld ypu review the patch

I would word the instructions a little differently personally to make them more clear, more like the instructions I included in #3. Granted, I haven't had to do this with only a few images from a gallery and I can't think of a reason that I would only want to load a gallery with a couple of the images to begin with. In this case, if possible, I'd suggest creating another partial gallery node.

Here were my previous instructions
-------------------------------

You need 3 total fields, in this order:

  • Image Field (this is the trigger, so usually set to a colorbox - galleryformatter thumbnail imagecache, or
    some other small colorbox image cache) Exclude from display
  • Image Field (this is the pop up, should have a larger colorbox imagecache) Exclude from display
  • Colorbox Trigger (set trigger to first image field, set popup token to the second image field.

Now the key is:

  • The first image field, make sure you check Group Multiple Values, and enter Show 1 and starting from 0
  • Now the second field set to Show "leave blank" and starting from 1

You should also make sure you Colorbox setting are right as well under Site Configuration > Colorbox.

  • Image field options (CCK) - Set to Per field gallery
  • Extra settings - make sure Enable Colorbox load is set.

Status:Needs review» Needs work

#5 works for me, thanks!!!

I think that the process of creating / merging multiple fields is a bit onerous in order to achieve this behavior. In D6 the lightbox2 module provided this functionality in the form of the "condensed" slideshow option. When using condensed, only the first img is output to the browser. Additional a tags are output for the additional slides with appropriate href, rel, and class attributes, but in those a tags 2 - n the img is not included, so the a tags are just empty and effectively invisible. Clicking the first image still initiates the full slideshow, but additional trigger images after the first are not displayed in the browser. If I get a chance I will try to put together a patch for this.

Finally! Got it, thank you for the solution and the documentation!

Issue summary:View changes

Followed #3 didnt work until I used the formatting from #5 (the key is to have the trigger field set format to colorbox and also the target field format set to colorbox as well).
Just thought I'd pass this on also.