Page 1 of 1
Images in table from URL
Posted: 2015-05-23 22:14
by kikee122
Hi there,
I have lots of image URL's in a database table.
I would like to show the image in the generated table. So, is there a way to have <img src="DATABASE FIELD VALUE">
Thanks
Re: Images in table from URL
Posted: 2015-05-24 22:34
by a.gneady
Yep. Open the generated templates/tablename_templateTV.html file in a text editor (where tablename is the name of the concerned table) and find the following placeholder in the file:
Code: Select all
<%%SELECT%%><%%VALUE(fieldname)%%><%%ENDSELECT%%>
fieldname is the name of your image url field. Change this to:
Code: Select all
<img src="<%%VALUE(fieldname)%%>" style="max-width: 200px;">
The max-width style in the above code might be needed to control the display size of the image .. you might want to use max-height instead based on how you want your layout to look like (the aspect ratio won't be distorted).