Re: [SMARTY-DEV] block functions
| From: | Andrei Zmievski | Date: | Thu, 04 Apr 2002 20:35:14 +0000 |
| Subject: | Re: [SMARTY-DEV] block functions | ||
| References: | 1 2 3 4 5 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-34@lists.php.net to get a copy of this message | ||
On Thu, 04 Apr 2002, Andreas Kossmeier wrote:
> 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.
That's what I'm wondering -- how will Smarty know it needs to add a
{section} in case of an arbitrary block function?
-Andrei
"In My Egotistical Opinion, most people's C programs should be indented
six feet downward and covered with dirt." -- Blair P. Houghton