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.
Comment | File | Size | Author |
---|---|---|---|
#1 | colorbox-hide-links-1.patch | 1.87 KB | hutch |
colorbox-hide-links.patch | 1.8 KB | hutch | |
Comments
Comment #1
hutch CreditAttribution: hutch commentedThis attachment does it with a dropdown, giving the Views developer a choice of All or 1 - 50
Comment #2
hutch CreditAttribution: hutch commentedI've resolved this by using inheritance to extend colorbox_handler_field_colorbox in my module, works well, thanks for providing this class ;-)