I've play around with the great module and using this in a search view (views 2.x) with the cck formatter modul
I use drupal 6.16 , cluetip .1.0.7, dimensions and hoverintent as well as jquery update with jquery ui 1.3.2
My cluetip is configured as following:
Drupal.behaviors.nodereference_formatters = function (context) {
$('a.nodereference-cluetip').cluetip({
width: '700px',
showTitle: true,
sticky: false,
activation: 'hover',
attribute: 'href', // DO NOT change this line unless you know what you are doing.
// mouseOutClose: true, // Might be bit buggy in some combinations.
cluetipClass: 'jtip',
clickThrough: true,
arrows: true,
fx: {
open: 'slideDown',
openSpeed: '1000'
},
ajaxSettings: {type: 'POST' },
});
}
The clickthrough works correctly but the href attribute link to the nodereference/custom path without template support
when i change the attribute field to 'rel', the cluetip doesnt work anymore
Have you any suggetions?
The best way should be
so the user clicks to the normal node page and the popup loads the ajax content via rel uri.
Thx in advance
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | cluetip.jpg | 103.33 KB | nk_ |
Comments
Comment #1
nk_ commentedHello,
unfortunately there is no Views support yet.
But thanks to Views2 feature "Rewrite the output of this field" you can achieve what you need by typing custom html there and set url and rel attributes to cluetip paths.
See the image I am attaching here.
Cheers, Nenad
Comment #2
iTiZZiMO commentedufortunately, it doesn't work anymore
the tipping point that the rel and href uri have to be always the same.
If we can achieve that the href uri link tot the normal page and the rel uri only used for ajax loading, the problem could be solved in a very good way.
Comment #3
nk_ commentedyou can put href to normal path and rel to ajax path, than change js file as appropriate and it will work.
Comment #4
iTiZZiMO commentedi tried it:
change function
+ add new variable urlnode
+ change links from l(title,$url --> l($title,$urlnode
function theme_nodereference_formatters_formatter_cluetip($element) {
if (!empty($element['#item']['nid']) && is_numeric($element['#item']['nid']) && ($title = _nodereference_titles($element['#item']['nid']))) {
_nodereference_formatters_cluetip_add_files();
$links = '
$url = check_url('nodereference/cluetip/'. $element['#item']['nid'] .'/'. $element['#formatter']);
// add new variable urlnode
$urlnode = check_url('node/'.$element['#item']['nid']);
$links .= l($title, $urlnode, array('attributes' => array('class' => 'nodereference-cluetip', 'rel' => $url)));
$links .= '
';
return $links;
}
}
change javascript code:
from
attribute: 'href', // DO NOT change this line unless you know what you are doing.
to
attribute: 'rel', // DO NOT change this line unless you know what you are doing.
The ajax content wont be loaded anymore. in firefox , a new blank tab would be created instead the tooltip.
when i undo the changes, the module works as it should work.
any ideas?
Comment #5
nk_ commentedI think you don't need check_url there, try to change:
$urlnode = check_url('node/'.$element['#item']['nid']);to
$urlnode = 'node/'.$element['#item']['nid'];please let me know if that works.