How to have Image Link Open in New Tab or New Window?

Permalink
I am seeking help on the following

How do I get to have my Image Link Open in New Tab or New Window?

Please let me know

 
cursal replied on at Permalink Reply
cursal
I too would like to know how to modify this.

I would like to use the Image Block because the ease of mouseovers vs only linking using an image in a content block.
I would like the external link to function as at least a template option.

I thought I had it figured out by copying & renaming

root/concrete/blocks/image
to
root/blocks/image/templates/new_window

then I took the code in the controller that has the link:
if($this->externalLink != ""){
$img = "<a href=\"{$this->externalLink}\">" . $img ."</a>";

and added the target="_blank" like so
if($this->externalLink != ""){
$img = "<a href=\"{$this->externalLink}\" target=\"_blank\">" . $img ."</a>";


but that did not work using C5 version 5.4.2.1

Suggestions?

same question in this thread:
http://www.concrete5.org/index.php?cID=33920&editmode=...