Download & Extend

node open in new window when teaser image in infowindow clicked

Project:GMap Module
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,
I am trying to open full nodes in new window when I click the teaser image in infowindow of gmap.

I see something in gmap_location.module this code:

$count = 0;
while ($row = db_fetch_object($result)) {
$count++;
$newmarker = array();
if ($mode == 1) {
// Popup
$newmarker['rmt'] = $row->nid .'/0';
}
elseif ($mode == 2) {
// Link
$newmarker['link'] = url('node/'. $row->nid);

I don't know how to fix it, but I was thinking if I could put "target->blank " in the line of link code, there might be some hope, but as I said, I don't know how to write this.

Or I may be totally wrong on this.

Could someone help me with this?

Thanks.

Comments

#1

I think I found a better one in line 754 of gmap_location.module that says:

function theme_gmap_location_infowindow_node__image($node) {
$out = 'nid) .'">'. check_plain($node->title) .'
';
$out .= image_display($node, 'thumbnail');
return $out;

I think I can try "target->_blank" between "a" and "href", but...

Does anyone know how to correctly write code above for this?

Thanks.

I hope I am not talking by myself all the time.

#2

having same issue,anyone knows way to fix it ?

#3

it results no effort reneekun..but another fix i found to open in new window on click clusterer marker(not link from infowindow) shown below .

in gmap module open js/marker.js
LINE 211 ->

open(marker.link, '_self');

change it to

open(marker.link, '_blank');

#4

Fixed for who needs the node open in new window ,when the teaser title in infowindow clicked (In Gmap node location map)

/modules/gmap/js/clusterer_marker.js

LINE NO:81

    t = '<a href="' + marker.link + '">' + t + '</a>';       

change it to

    t = '<a target = "_blank" href="' + marker.link + '">' + t + '</a>';    

nobody click here