Re: Snapshot directory
| From: | Monte Ohrt | Date: | Mon, 25 Mar 2002 23:16:19 +0000 |
| Subject: | Re: Snapshot directory | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3340@lists.php.net to get a copy of this message | ||
oops, its not linked from the index page.
http://www.phpinsider.com/php/code/Smarty/snapshots/
Andreas Heintze wrote:
>
> Where can I find this directory?
>
> -----Ursprungligt meddelande-----
> Från: Andrei Zmievski [mailto:andrei@ispi.net]
> Skickat: den 25 mars 2002 23:41
> Till: smarty@lists.ispi.net
> Ämne: [smarty] Block functions
>
> I have put in the initial implementation of block functions. For
> example, if you have the following template:
>
> {table cols=3}
> ...
> {/table}
>
> Then your block function is going to be called twice: once for the
> opening tag and once for the closing tag. The second time is when the
> actual content between the tags is passed to the function. The prototype
> for block function is like this:
>
> function smarty_block_table($params, $content, &$smarty)
>
> $content will be null for the opening tag so you can easily test whether
> you are being called for opening/closing tag by using isset($content).
>
> Block functions take precedence over custom functions with the same
> name. Also, you can pass attributes to the closing tag, e.g. {/table
> foo=yes}.
>
> I'd like to get feedback on this implementation, so download the
> snapshot Smarty-snapshot-20020325.tar.gz from the snapshots directory.
>
> -Andrei
>
> Hacker: Any person who derives joy from
> discovering ways to circumvent limitations.
>
> ---
> You are currently subscribed to smarty as: andreas.heintze@home.se
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
Director of Technology, ispi Inc.