Re: How to use a Smarty variable in an external source ?
| From: | Mike Krus | Date: | Mon, 23 Jul 2001 14:43:34 +0000 |
| Subject: | Re: How to use a Smarty variable in an external source ? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1247@lists.php.net to get a copy of this message | ||
Hi,
Monte Ohrt wrote:
The resource requires to send back a last modified date, which will be used to determine if a recompile is necessary. I started using resources for translation and it works nicely. Theonly thing I added to Smarty was passing the instance of the smarty object by reference as first parameter. I found this useful so the resource handler could be a chance to know what the current smarty context is. So handler would be: function myHandler(&$smarty, $tpl, $tpl_content, $tpl_timestamp) { ... } and I changed Smarty to call the handler and pass $this as first parameter. Mike