Adding url to image

Permalink Browser Info Environment
How can i add a url to a image in the scroller?

Type: Discussion
Status: New
buromax
View Replies:
jb1 replied on at Permalink Reply
jb1
Yes, absolutely. In the ditor interface just choose which custom field should be used to store the URL. You can creat a custom field in the File Manager from the Dashboard.

Hope this helps.

JB
nextlvl replied on at Permalink Reply
nextlvl
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
jb1 replied on at Permalink Reply
jb1
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.
nextlvl replied on at Permalink Reply
nextlvl
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.
jb1 replied on at Permalink Reply
jb1
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:

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
nextlvl replied on at Permalink Reply
nextlvl
Thanks JB, worked perfectly.

Cheers,

Alan

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.