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

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

View Replies:
cursal replied on at Permalink Reply
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


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


same question in this thread: