Re: [SMARTY-DEV] block functions
| From: | Andreas Kossmeier | Date: | Thu, 04 Apr 2002 20:33:41 +0000 |
| Subject: | Re: [SMARTY-DEV] block functions | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-33@lists.php.net to get a copy of this message | ||
Andrei Zmievski wrote:
Not really. Block functions work at run-time, not compile-time.that's what i wanted to hear ;-)
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.a compiler block function was my first thought, it's the most flexible way, but maybe processing the body before compilation would be the easiest way (e.g. adding a {section} in case of the table block). the compilation process would be still the same. -- andreas kossmeier bergfex.at - http://www.bergfex.at