|
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 |
cjxxi Smarty Regular
Joined: 03 Aug 2007 Posts: 40 Location: Fort Worth,Texas
|
Posted: Tue Jan 15, 2008 5:13 am Post subject: Smart exit |
|
|
how would do something inside the template that would exit the template but not the php script... just like php built-in function exit() or die(); without using an if, else statement? and only exit the template not the php code. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jan 15, 2008 8:21 am Post subject: |
|
|
A compiler plugin that emits a php return-statement should do it. |
|
Back to top |
|
floppydrivez Smarty Rookie
Joined: 31 Mar 2008 Posts: 14
|
Posted: Sun Jun 20, 2010 4:17 am Post subject: |
|
|
This would be a great feature, sorry to dredge up the past. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sun Jun 20, 2010 2:00 pm Post subject: |
|
|
This would only encourage poorly formed templates. There should be no reason to "exit" a template. Use an IF statement around the logic you do not want to execute. If you start exiting templates, you just create more situations that are harder to debug. |
|
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
|