|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
master_kaos Smarty Regular
Joined: 02 Aug 2007 Posts: 54
|
Posted: Fri Dec 14, 2007 1:53 pm Post subject: supress smarty error |
|
|
I have a skin system going on. so in my index i have something like
{include file="#skin#/$section.tpl"}
Now if section is not in the skin directory, I do not want the error to show.
is there a way to do something like
{@include file="#skin#/$section.tpl"}
? |
|
Back to top |
|
Celeb Administrator
Joined: 17 Apr 2007 Posts: 1025 Location: Vienna
|
Posted: Fri Dec 14, 2007 2:08 pm Post subject: |
|
|
A few options come to my mind:
Write your own error handler.
Check if the file exists before you {include} it.
Write a modifier, that returns the original filename if the file exists or an empty default file to include if it doesn't. _________________ Darn computers always do what I tell them to instead of what I want them to do. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|