Re: smarty] Re: How does compiling work?

From: Date: Fri, 28 Dec 2001 22:56:43 +0000
Subject: Re: smarty] Re: How does compiling work?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2426@lists.php.net to get a copy of this message
On Fri, 28 Dec 2001, Brian E. Lozier wrote: > Then what exactly does compiling do? It compiles the templates themselves together? But what > happens if I > have a conditional template call? > > if($condition) { > $tpl->assign('Content', $tpl->fetch('condition1.tpl')); > } else { > $tpl->assign('Content', $tpl->fetch('condition2.tpl')); > } > > How does smarty compile that? If it leaves the templates totally separate (which seems like > the only way > possible..) why is it called compiling? What gets compiled? The template code and HTML get compiled into an equivalent PHP script. Look at the compiled template one of these days. -Andrei We all have photographic memories, it's just that some of us don't have any film.

« previous php.smarty.general (#2426) next »