Re: [PHP Template] modules for the templating language
[email protected] (Andrei Zmievski) Fri, 18 Feb 2000 09:21:59 -0600
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
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