 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
bimal Smarty Elite

Joined: 19 Apr 2007 Posts: 419 Location: Kathmandu, Nepal
|
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? _________________ Skype: pbimal
To hire instantly as a freelancer - https://www.odesk.com/o/profiles/users/_~~657b70cc7f2c616a/
Visit my website - http://bimal.org.np/ for more articles
800+ screenshots to learn about website mistakes: http://mistakes.sanjaal.com/ |
|
| Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7038 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: 419 Location: Kathmandu, Nepal
|
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. _________________ Skype: pbimal
To hire instantly as a freelancer - https://www.odesk.com/o/profiles/users/_~~657b70cc7f2c616a/
Visit my website - http://bimal.org.np/ for more articles
800+ screenshots to learn about website mistakes: http://mistakes.sanjaal.com/ |
|
| 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
|