Page 1 of 1

Image Template: Link on caption

Posted: Wed 21. Sep 2016, 16:30
by macangelo
Hi all

I'm using the content part "Images <div>" and apply a link on the image by writing in the caption field something like:
my image|my image|target.html

Is there a way to setup the inc_cntpart/images/mytemplate.tmpl so that the link is automatically also on the caption?

Thanks a lot

Re: Image Template: Link on caption

Posted: Wed 21. Sep 2016, 18:26
by Oliver Georgi

Code: Select all

[URL]<a href="{URL}"[URL_TARGET] {URL_TARGET}[/URL_TARGET]>{URL}</a>[/URL]

Re: Image Template: Link on caption

Posted: Wed 21. Sep 2016, 19:11
by macangelo
Besten Dank!

Wie kann ich die beiden Zeilen schachteln? Damit die Caption, die im Backend eingetragen wurde, auch durchgespielt wird?

Code: Select all

[URL]<a href="{URL}"[URL_TARGET] {URL_TARGET}[/URL_TARGET]>{URL}</a>[/URL]
[CAPTION]<p class="img-caption">{CAPTION}</p>[/CAPTION]

Re: Image Template: Link on caption

Posted: Fri 23. Sep 2016, 11:49
by kleiner_Punkt
;)

Code: Select all

[CAPTION]<p class="img-caption">[URL]<a href="{URL}"[URL_TARGET] {URL_TARGET}[/URL_TARGET]>{CAPTION}</a>[/URL]</p>[/CAPTION]

Re: Image Template: Link on caption

Posted: Fri 23. Sep 2016, 12:00
by macangelo
cool!

Re: Image Template: Link on caption

Posted: Sat 24. Sep 2016, 11:54
by top
Wenn ich das richtig überblicke, bleibt so der Absatz mit der Caption leer, wenn kein Link gesetzt wird. Mit folgender kleinen Ergänzung dürfte es auch ohne Link funktionieren: (ungetestet)

Code: Select all

[CAPTION]<p class="img-caption">[URL]<a href="{URL}"[URL_TARGET] {URL_TARGET}[/URL_TARGET]>[/URL]{CAPTION}[URL]</a>[/URL]</p>[/CAPTION]