{foreach from=$sm_photos item=item}
<img src="/content/photophoto/1/{$item.file}">
{/foreach}
If your path will not target image file, you can get 404 error, but typically image will be just hidden
PHP Coding tips & tricks. Function & error explanation, coding style, how tos etc. Short notes posted directly from developer work environment.
PHP Coding Tips
Thursday, March 28, 2013
Sample smarty loop with images
If you want to print several images on your site, you must assign array of those images to smarty variable. Then, you can iterate over this array in smarty and show img tags for each image. Rember about good path:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment