|
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 |
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Sat Mar 14, 2009 4:58 am Post subject: PHP includes - Remake it |
|
|
Instead of having two different tags
{include} and {include_php}, it would nice to merge them.
For example:
{incude file='...'} is a simple template include.
{include file='...' php=true} would do parsing a .php file as by {include_php}.
Plus, there should be a better validator, that should know, if an incuded file is a real php or not.
I love writing slim codes; and thus asked to throw {include_php} away.
And, is there a general idea to know, how many people use this tag? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Mar 14, 2009 3:54 pm Post subject: |
|
|
Smarty 3 will allow php template resources, which are not compiled:
{include file="php:foo.php"} |
|
Back to top |
|
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Sat Mar 14, 2009 6:15 pm Post subject: This is also good. |
|
|
This is also good.
I have a feelings that for a true template engine implemenation, we may have to rarely bother about parsing template files.
It was my unfortue to me that I happened to learn {php} tags instead of other features, and first year of my Smarty was too poor.
These days, I never think of parsing php files or writing inline php codes in a template. |
|
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
|