Re: [SMARTY-DEV] Compiling templates

From: Date: Tue, 15 Apr 2003 15:51:42 +0000
Subject: Re: [SMARTY-DEV] Compiling templates
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1163@lists.php.net to get a copy of this message
The reason Smarty does not have a "compile everything" feature is because there is no foolproof way to do it. Many times the compiling of templates relies on environment variables such as vars passed in URLs, different compile_ids, etc. You could use a web-bot to traverse the pages of your website, that would probably work in your case. If your templates don't rely on any environment vars, you could write a command line script that calls fetch() on each (top-level) template file. Maybe someone could contribute a crafty script that traverses the template_dir and compiles them unconditionally. But I won't be the one to support it ;-) Monte On Tue, 2003-04-15 at 10:13, luis wrote: > Hi all, > > I'm having the following problem and would like to get some ideas: > The application we are building is multilanguage and we use a prefilter > to translate strings. Some screens are very very big and have a lot of > strings so compiling takes a lot of time/resources, once the template is > compiled everything runs fast and smooth. > The problem is that users can't won't understand that they have to > increase the maximum memory or execution time for PHP to compile strings > so the solution is to ship the application with the templates already > compiled. > Is there ANY practical way to make Smarty compile all the templates? > Something like $smarty->compile_all_templates($compile_id); > Other comments or suggestions for this problem? > > TIA. > Luis. > -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#1163) next »