block functions

From: Date: Thu, 04 Apr 2002 12:25:06 +0000
Subject: block functions
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-17@lists.php.net to get a copy of this message
hi, i've just tried the new block functionality in the latest snapshot. for simple block function (e.g. translation, etc.) it's working fine, but take a look at a possible table block function: : : {table cols=4 from=$data item=td} :
    this is ID {$td.ID} of {$td.name}
: {/table}
: the block function has only access to the eval'd body of the block, so looping over data will not be possible. even if there is access, this solution wouldn't be clean. IMO a compiler part for the body of the block function could do the job, so why not introducing the possibility of processing the body at compile time? andreas -- andreas kossmeier bergfex.at - http://www.bergfex.at

« previous php.smarty.dev (#17) next »