(edited the original issue)

In Views, if you setup a Colorbox trigger on a field which has no Colorbox formatter, then the URL for the trigger will be full of messy Javascript parameters.

This isn't desired because:
-If someone has their Javascript turned-off then they will see nothing.
-It's better for SEO if the URL is a cleaner.
-It looks nicer in peoples' status bars in their browser when they hover over the link.

If you have your Colorbox Trigger pointing to a field with a Colorbox formatter... such as a CCK image field where you're able to select "Colorbox: thumbnail" from the formatter list... then the URL for the trigger is a clean URL to the thumbnail image file. This is great! The modal works fine, and when Javascript is turned off at least some regular functionality is possible.

CommentFileSizeAuthor
#3 colorbox-triggerdegrade-1491284.patch563 bytesano1
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cablestein’s picture

Is this a Views issue, or Colorbox issue?

frjo’s picture

Colorbox issue. If you have a patch to make it work better I would be happy to take a look.

This is a advanced feature and it seems to work ok so it's pretty far down on my Colorbox todo list.

ano1’s picture

@frjo: I have come up with a solution for Colorbox 7.x-1.3 . I noticed that the NID for the record item exists in the view render array in colorbox_handler_field_colorbox_patched.inc . So I was able to insert a link to that NID into your link function. Now when JS is disabled, the link goes to the node. Hope this helps. Also if you would prefer I open this as a separate issue item as this is D7 and D6, I am happy to do so.

frjo’s picture

Version: 6.x-1.1 » 7.x-2.x-dev
Status: Active » Fixed

Committed to 7.x-2.x. Thanks for this nice and clean patch ano1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Revised original issue