I've been developing Views for the Imagepicker module and have found in testing that the colorbox trigger handler works but with a gotcha: I point it to a collection of images and these appear in a block with every link visible. I only want the first link to be visible (for obvious reasons). The link was made using 'Global: Custom text' which has been selected as the trigger.

Now I can hack about with css no problem but that is not really a solution, so I had a poke around in colorbox_handler_field_colorbox.inc and came up with a solution. It provides another option to hide the first link and uses the class 'js-hide' to do it.

Patch on current dev attached.

@frjo, this patch should not alter any existing behaviour but you might want to set the default to 'FALSE' just to ensure that nobody gets any surprises.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hutch’s picture

FileSize
1.87 KB

This attachment does it with a dropdown, giving the Views developer a choice of All or 1 - 50

hutch’s picture

Status: Active » Closed (works as designed)

I've resolved this by using inheritance to extend colorbox_handler_field_colorbox in my module, works well, thanks for providing this class ;-)