Re: [PHP Template] modules for the templating language

From: Date: Fri, 18 Feb 2000 15:21:59 +0000
Subject: Re: [PHP Template] modules for the templating language
References: 1  Groups: php.template 
Request: Send a blank email to php-template+get-149@lists.php.net to get a copy of this message
On Thu, 17 Feb 2000, Paras Dagli wrote: > ************************** > addressBook.php > > <?php > > // Include header file for modules > tmpl_headerFile("modules.inc"); > > // Print other modules, or whatever else > > // If there is a module for First Name, Last Name then print that > // otherwise we do the DB query, php parsing, variable assigning, .... > {:if FIRSTLASTNAME} > // Retrieve buffer with variables inserted, and print. > print tmpl_getbuf(FIRSTLASTNAME); > {:else} > // no module, so do we do what should happen in moduleNames.php > // like DB query, variable assignment, ... > {/:endif} > > ?> > > > ************************** > > modules.inc > > <:defineModule name=FIRSTLASTNAME> > php: moduleNames.php; > tmpl: moduleNames.tmpl; > </:defineModule> Hmmm. Why do you have template constructs in regular php code? Do you mean it would be parsed by template first and then evaluated? -Andrei Give a man a fish; you have fed him for today. Teach a man to use the Net and he won't bother you for weeks. -Author unknown

« previous php.template (#149) next »