Re: [SMARTY] RE : [SMARTY] how to combine modifyer: popup and get_string

From: Date: Fri, 18 Apr 2003 13:05:23 +0000
Subject: Re: [SMARTY] RE : [SMARTY] how to combine modifyer: popup and get_string
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9317@lists.php.net to get a copy of this message
On Fri, Apr 18, 2003 at 02:46:05PM +0200, Christopher Rousseau wrote: > It look like you have create a function plugin and not a modifyer. > > I would suggest 2 options : > > - Look how the assign function work and modify your get_string plugin to > add the possibility to assign the string to a smarty var, then use the > var > Ex : > {get_string id="553 var="myString} > {popup text=$myString} > > - modify your popu_up function plugin to accept an id. your pop_up > function will directly call your php function who return a string from > an ID. or write a real modifier, that takes the $id and "modifies" it to (==returns it) a string. the call to popup would become: {popup text=553|get_string} or {popup text="553"|get_string} or {popup text=$id|get_string} > bye > > -----Message d'origine----- > De : Ronan PAUL [mailto:ronanpaul@hotmail.com] > Envoyé : vendredi 18 avril 2003 13:41 > À : smarty-general@lists.php.net > Objet : [SMARTY] how to combine modifyer: popup and get_string > > Hello, > > I am using my own modifyer, get_string, which calls a PHP function which > > returns a string based on its ID: > {get_string id="55"} will echo "Hello World". > > Now, I want to send this value as the text of a popup. Something like: > {popup text="{get_string id="55"}"} > > Excepted this syntax does not work ! > > How can I achieve that (I have tons of strings so I would like a > solution > that does not require me to manually create a string for *each* id). > > Thank you for your help, > > Ronan PAUL > > _________________________________________________________________ > MSN Search, le moteur de recherche qui pense comme vous ! > http://search.msn.fr/worldwide.asp > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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