Colorbox Links in Views

mattie's picture
mattie
Wed, 04/10/2013 - 09:51
#1
Colorbox Links in Views

I'm using Colorbox to link to external URLs in taxonomy node lists generated by feeds, and I'd like to do the same in the blocks on the home page and in the sidebars.

So, in other words, the links in taxonomy node lists such as this ...

Taxonomy node list

... open in a Colorbox overlay, like so: 

External link opened in colorbox

  The syntax I'm using to create the Colorbox links here is something like this:

        <a href="<?php print $node->field_source_url['und'][0]['value']; ?>?width=80%25&height=70%25&iframe=true" class="colorbox-load"><?php print $title; ?></a>

So, that's the background. Now, moving forward, I'd like to use Colorbox links in the views/blocks on the home page and in the sidebars: Features, Headlines, Category news, and so on. How specifically do I accomplish this?Best,Mattie

mattie's picture
mattie
Sat, 04/13/2013 - 18:05

HELLO?  IS ANYBODY OUT THERE?

Neo's picture
Neo
Mon, 04/15/2013 - 22:22

Hi Mattie,

in view fields, add your field_source_url and check "Exclude from display"

Click Apply then choose "Title" field, check "Rewrite the output of this field then insert something like this:

<a href="[field_source_url]"?width=80%25&height=70%25&iframe=true" class="colorbox-load">[title]</a>

mattie's picture
mattie
Wed, 04/17/2013 - 16:07

What is the path to get to these view fields, please? (Admin > Structure > Views ... then what?) Whoops, never mind, I found it.

 

Thanks, Mattie

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.