1. canwestboss
  2. Free Templates / Extensions
  3. Wednesday, 24 April 2013
  4.  Subscribe via email
Is there a way to make the url open in a new window. I did not see any place for _target in the configuration
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Chuck

In your modules mod_j51hover.php (../modules/mod_j51hover/mod_j51hover.php) try replacing the following...


<a href="/<?php echo $hover_link; ?>" class="info">Read More</a>


With...


<a href="/<?php echo $hover_link; ?>" class="info" target="_blank">Read More</a>


Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Ahh But Now I get tricky

I have this module in three places on the site. I only want one of them to open in a new window
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
You will have to add a field in the modules parameters to add a target..

In your modules mod_j51hover.xml add the following just before </fieldset>..


<field name="target" type="text" default = "_self" label="Target"  description = "Target"/>


In your modules mod_j51hover.php add the following just after $HOpacity = $params->get('HOpacity', 0); ...


$target = $params->get('target', '_self');


And finally further done on the same file replace the following...


<a href="/<?php echo $hover_link; ?>" class="info">Read More</a>


With...


<a href="/<?php echo $hover_link; ?>" target="<?php echo $target; ?>" class="info">Read More</a>


I haven't actually tested this so you might have to get back to me if it doesn't work :)

Ciarán
  1. more than a month ago
  2. Free Templates / Extensions
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!