Re: [SMARTY] Using assign within a function

From: Date: Thu, 07 Dec 2006 17:28:38 +0000
Subject: Re: [SMARTY] Using assign within a function
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13636@lists.php.net to get a copy of this message
Donald Organ wrote:
is it possible to have something like this, inside a template? {foreach from=$Items item=Item}
    {php}
        $thumb = $product->getImageThumb();
        $smarty->assign( 'ProdThumb', $thumb );
    {/php}
    {$ProdThumb}
{/foreach}
I don't see the benefit even if it could be done. You end up getting the same thumb over and over again on every loop. Or am I (or You) missing something here?

« previous php.smarty.general (#13636) next »