Re: [SMARTY] what is the best way to apply a varaible modifier within a text string

From: Date: Sat, 14 May 2005 10:25:17 +0000
Subject: Re: [SMARTY] what is the best way to apply a varaible modifier within a text string
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12637@lists.php.net to get a copy of this message
On Sat, May 14, 2005 at 10:28:53AM +0200, lpenou wrote: > Hello > > I'm looking for the best way to apply a modifier to a variable, but > this variable have to be used in a string, for example > > {include file="navigator.tpl" title="This is the Navigator title > for $item|capitalize"} > > capitalize has to be applied only on $item and not the full string you have to use capture or assign. like {capture name=title}This is the Navigator title for {$item|capitalize} {/capture} {include file="navigator.tpl" title=$smarty.capture.title} or {assign var=tmp_item value=$item|capitalize} {include file="navigator.tpl" title="This is the Navigator title for $tmp_item"} HTH messju > did someone ave a simple solution ? > > regards > Laurent > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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