So, I'm looking to combine http://drupal.org/project/colorbox and Nivo Slider. When I click on an image, the image will popup in a colorbox.

Problem is the rendering of the link only works for node link-type fields.

The following patch allows me to assign a "custom link" to the link for the slider.

Example of usage:
- I have a View that displays the Images from a node
- Added a field "Global: Custom text", added the custom path/classes, and now when I click on the image in the Nivo Slider, I can open up a link to the image on display

Also, this patch makes some fixes in views-nivo-slider-view.tpl.php that caused some errors/warnings to occur.

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mmilo’s picture

FileSize
2.79 KB

Whoops, left a dpm() in there.

pedrofaria’s picture

Assigned: Unassigned » pedrofaria
Status: Active » Needs review

I will make some tests and review it... community can do it to...

Thanks for your time spent on this module :)

pedro

yan’s picture

This works whenever "Link this field to its node" or "Output this field as a link" is checked. But those options don't allow me to set the rel attribute I need for lightbox. It would be nice to also allow custom links.

Can't find the code to change in views-nivo-slider-view.tpl.php.

mmilo’s picture

Any chance we can have this committed ... ?

@yan See http://drupal.org/node/607942

yan’s picture

Thanks for the hint, mmilo. That worked.

mist’s picture

First of all thank you for your work.

If I may I would like to have one request could you do it for lightbox trigger and colorbox trigger fields ?

mmilo’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Assigned: pedrofaria » Unassigned
FileSize
5.63 KB
1.64 KB

Updating this for Drupal 7. Also including a test view.

This view is setup to:
- Present the images of a node, the node having a multi-value image field
- There is a Nivo Slider powered slideshow
- Clicking on an image in the slideshow will open the image (the image style can be configured in Views) in a Colorbox.

podarok’s picture

Status: Needs review » Active

bot reset

podarok’s picture

Status: Active » Needs review

bot!

Status: Needs review » Needs work

The last submitted patch, views_nivo_clickable_links.patch, failed testing.