Re: PHP Template (smarty)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Markus wrote:

> i'm learning some PHP template classes, almost all of it using
> str_replace() function.
> 
> they work by reading the template file *.tpl and then replace some
> string/tags that having format like {FOO}
> 
> my question is: why they using this technique? i think that it eat
> more resources by reading the *.tpl file, find & replace {FOO} tags,
> and include it in php file that call the class.
> 
> why not just use a variable/array and embed it to the template file? i
> giving example so you can understand what i mean.

Yes, that is one of the biggest drawbacks of Smarty. A better templating 
engine would be Savant (http://www.phpsavant.com/) which implements the same 
procedure stated by you in your mail.

-- 
[ Rajesh Kumar ]


PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux