URL's in Gallery images
URL's in Gallery images
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.
Re: URL's in Gallery images
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...
Re: URL's in Gallery images
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
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
Re: URL's in Gallery images
Add extra field in Gallery "Field Definitions", like "link" and use it like this:
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.
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}
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.