Page 1 of 1

Smarty If statements [Resolved]

Posted: Thu Jul 17, 2008 8:34 am
by theyapps
Is it possible to use smarty to test if a file exist?

Essencially I want to be able to use smarty to test if a image exists. Display it if it does. Don't display it if it don't.

I have read through documentation and can't find anything related to this.

CMS Vers: 1.3.1

Re: Smarty If statements

Posted: Sat Jul 19, 2008 1:26 am
by cyberman
Smarty is only a template engine. A file_exists() should be better placed in a userdefined tag ...

Re: Smarty If statements

Posted: Sat Jul 19, 2008 5:32 am
by theyapps
Awesome I never noticed the user defined tags area! Thank you a lot! Props to you as the most helpful and polite user on these forums so far. I won't say I've been here long but you defenatly are very helpful! Thank you again!