By JimNastic on
Hi,
Instead of linking from individual fields, I would like the entire row of my view to be active as a link. I would also like to be able to highlight it with a border or background when the user hovers over it.
I found a similar post here: http://drupal.org/node/444762
The difference is that I am using "unformatted" style instead of "table" and hoping that in my case this is easier to achieve.
My site is here:
http://romantikpensionen.de/
The view I am referring to is the three pictures next to each other near the bottom of the front page.
Does anyone have a suggestion?
Cheers,
Jim
Comments
_
I don't think table or unformatted makes much difference, i don't think its a trivial task either way. Making it highlight on hover is just a matter of styling :hover (only works on anchor tags in ie6 btw) with css appropriately. To make a whole row link, I would think you'd have to theme the row to include some jquery like:
Found another approach
Hi,
Thanks for your suggestion. Actually someone on IRC made another suggestion. I will post it here so if anyone else has the same question they can choose.
I hid most of the fields in the view then did rewrite output of the remaining field to include the other hidden fields. This meant that all the fields were within the anchor. Here's the code within the "rewrite output" box:
Additionally you need to enter the path in the "Link Path" box:
Note that [title], [field_region_bild_fid] and [nid] are "replacement patterns" enabling substitution by views 2 of my views fields into the output.
Cheers,
Jim
_
clever! Thanks for posting it back.
clever indeed!
Finally!! Solved my problem, too-- thanks JimNastic!
I'm newbie
How to rewrite output? And where's the "rewrite output" box? which page?
Thanks.
It works
Thank you.
I've managed to get it after some trial&error.
Thanks
thanks!
/chris