Re: [SMARTY] Modifiers on embedded variables

From: Date: Sat, 05 Nov 2005 01:34:23 +0000
Subject: Re: [SMARTY] Modifiers on embedded variables
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13151@lists.php.net to get a copy of this message
--- "A.J. Brown" <aj@bitnotion.com> wrote: > Is there any way to use modifiers on embedded variables using > backticks? [..snip...] > However, I've run across similar situations where using {assign} was > not appropriate, and I've had to resort to formatting the string in > the business logic :(. Is there any way to use modifiers on > backticked variables that I'm missing? No, it is not supported. Backticks do not start a new context. Why is assign not appropriate? Have you considered {capture} for more complicated texts? Another trick when using {popup} is to use a JS callback to assign the text: <script> function MyPopuptext() {ldelim} return '{$popuptext|escape:"javascript"}'; {rdelim} </script> <a href="javascript:void(0);" {popup function="MyPopuptext()"}>{$data[list].idusers}</a> boots __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com

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