Adding url to image
Permalink Browser Info Environment
How can i add a url to a image in the scroller?
Type: | Discussion |
---|---|
Status: | New |
Hi JB,
I've created a Text custom attribute in File Manager for my images in the add on, but can't figure out how to set up the link so it opens in a new window (ie. target=_blank). Is there a custom attribute you can add on that allows for URL's opening in a new window, or another solution?
Thanks,
Alan
I've created a Text custom attribute in File Manager for my images in the add on, but can't figure out how to set up the link so it opens in a new window (ie. target=_blank). Is there a custom attribute you can add on that allows for URL's opening in a new window, or another solution?
Thanks,
Alan
Off the top of my head the only way to make links open in a new window is to tweak the view.php file. It's intended to jump to another page on your site, but you can certainly link to external sites.
If you need guidance on where to edit the view.php file, I'll be behind my computer on Monday.
Hope this helps.
If you need guidance on where to edit the view.php file, I'll be behind my computer on Monday.
Hope this helps.
Hi JB,
Thanks for that. I'm not so handy with PHP so if you can give me some pointers that'd be much appreciated.
Thanks for that. I'm not so handy with PHP so if you can give me some pointers that'd be much appreciated.
Ok, just open the packages/jb_smooth/blocks/jb_smooth/view.php file in your favourite text editor.
On line 131 change it fromt this:
to this:
Then upload the view.php file via FTP and reload your page with the Smooth Scroller on it. Done!
Hope this helps.
JB
On line 131 change it fromt this:
echo "<a href='".$fv->getAttribute($linkToPageField)."'>";
to this:
echo "<a href='".$fv->getAttribute($linkToPageField)."' target='_blank'>";
Then upload the view.php file via FTP and reload your page with the Smooth Scroller on it. Done!
Hope this helps.
JB
Thanks JB, worked perfectly.
Cheers,
Alan
Cheers,
Alan
Hope this helps.
JB