Re: [SMARTY-DEV] block functions
| From: | Andrei Zmievski | Date: | Thu, 04 Apr 2002 20:18:57 +0000 |
| Subject: | Re: [SMARTY-DEV] block functions | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-32@lists.php.net to get a copy of this message | ||
On Thu, 04 Apr 2002, Andreas Kossmeier wrote:
> is there another way using the current functionality?
Not really. Block functions work at run-time, not compile-time.
> this would be the other way of doing it, but how should this eval() for
> the body work without losing the built-in compilation process of smarty?
>
> IMO a possible function called before compilation can do a lot, without
> influencing the compiling process of smarty.
>
> maybe there is a better solution for that.
Yes, compiler-block-functions. Much more work for compiler to do though
(keeping track of nested code blocks) and so on. But possible. The
compiler-block-function will need to output appropriate PHP code to loop
its content, Smarty won't do it for you.
-Andrei
* Change is the only constant. *