Monday 05 May 2003 6:42:31 am
Is it possible to check for file_exist in a template? I have pictures of users in the system (search-site which lists user-information) and want to show pictures of them, but don't want the img tag to be showed in the browser if the image does not exist. Mozilla don't show it anyway if the Image don't exist, but IE does, so I have to do a check here.
Something like this, but the show=eq (file check if not empty)don't work:
{section show=eq("http://www.*.*/pictures/$SearchResult:item.email[.jpg]",' ' )|not() }
<td><img src="http://www.*.*/pictures/$SearchResult:item.email.jpg"</td> {/section]
Don't know how to solve this problem :/ Shortly: the users are in the db, $SearchResult:item.email contains the emails looped and listed out for every user, and this data ($) I use to retrieve the Image which have name like the email.
|