URL's in Gallery images

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Steady
New Member
New Member
Posts: 6
Joined: Mon Apr 21, 2008 9:54 pm

URL's in Gallery images

Post by Steady »

I'm adding a portfolio style page to my CMSMS site using the Gallery module to display thumbnails that show larger images when clicked. Standard Gallery stuff so far. I'm struggling, however, to figure out how to allow visitors to click the larger images and go to relevant website. I've tried putting link code in the Title field but that breaks the standard template.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: URL's in Gallery images

Post by Dr.CSS »

Depending on what gallery template you are using as to whether you can do a link to somewhere else, I've made changes to templates before to add a link to them, just have to be able to make those changes to the template...
Steady
New Member
New Member
Posts: 6
Joined: Mon Apr 21, 2008 9:54 pm

Re: URL's in Gallery images

Post by Steady »

Thanks Dr.CSS
I'm using one of the standard templates currently (FancyBox) but have no preference at the moment. Any assistance with how to add links in the Title field?
Regards, Edward
uniqu3

Re: URL's in Gallery images

Post by uniqu3 »

Add extra field in Gallery "Field Definitions", like "link" and use it like this:

Code: Select all

{if !empty($image->fields.link.value)}      
<a href="{$image->fields.link.value}"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
{else}
<a class="group" href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->titlename}" rel="gallery"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
{/if}
I hope you get the idea, the {else} part is standard Fancybox Template part, so it's up to you how or if you want to use that.
But for some sort of Portfolio page, i would recommend to take a look at CGBlog or Products modules, at least i prefer to use these for tasks like this, you are still able to intergate Gallery Module throught extra fields.
Post Reply

Return to “Modules/Add-Ons”