What is the best way to inlcude an image in Format Template?
Author: ldriver
Publication Date: 10/13/2016 21:59
I want a format template that just displays an image. I have the image in the media store under a folder called images (name is sample_logo).
When I create the format template, I need something like this:
<img src="??" alt="Sample Text" height="42" width="42">
What goes in the src, I figure something like this $CMS_VALUE(SOMETHING)$...
Is format template the best way to use an image? This is eventually going to be used in a text block, where the user can type some text and insert this image wherever they want.
Tags: format_template, image
-
Author: bIT_sosswald - 10/18/2016 8:03
Hi Leland,
try $CMS_REF(...)$ this should be what you are looking for.
For a detailed information just take a look inside the documentaion. (http://www.e-spirit.com/odfs52/vorlagenentwick/vorlagensyntax/anweisungen/cms_ref/)
Best Gegards
Sandro0 -
Author: ldriver - 10/18/2016 13:26
I tried and it did not work, image is coming up blank.
0 -
Author: bIT_sosswald - 10/18/2016 14:37
Hi...
It should work using the propper configuration of $CMS_REF(...)$
We have a working picture implemented like shown in the following source where "bit_logo" is the reference name of the image.
<img src="$CMS_REF(media:"bit_logo")$" alt="bridgingIT-Logo">
Greetings
Sandro
0 -
Author: ldriver - 10/18/2016 14:39
I will try it like your example and see if that works.
Thanks.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare