Putting a link underneath an Image

I’m using the standard Image field to insert an image. Sometimes I want the image to act as a clickable link to another resource, and the logical place to do that would be when the image field is loaded as “add Content”.

I created a “Setting” for the standard Image field with fieldtype “Link”, and I presumed that it works by amending the template with an <a> tag around the default template code.


<a href="[[+reslink]]"><img src="[[+url]]" width="[[+width]]" height="[[+height]]" alt="[[+title:htmlent]]"></a>

([[+reslink]] is the “Reference” you enter when setting-up the Setting).

Is this how you would do it?


Nic Boyde

Yes, that’s how I’d do it :slight_smile: