Re: Sigma template
| From: | Jacques | Date: | Sat, 10 Jul 2004 04:33:00 +0000 |
| Subject: | Re: Sigma template | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-13594@lists.php.net to get a copy of this message | ||
Jacques wrote:
Hi people! I have a litle doubt with Sigma Template; How don´t parser a caracter "{" and "}"? I don´t get return a complete javascript function because, after parser, the "{" and "}" be parsed together... Template:Hi people again! Well, temporarily i solve my problem. But this is correct? A hack for use {} inside of template without parse (to use a javascript function () {} <--, for example). HTML_Template_Sigma::setCallbackFunction('k', array(&$this, '_keys')); function _keys($value){text} --> will be replace by "My text".{javascript} --> will be replace by "function go() { ... }" but after the parser with setVariable, i have:{text} --> replaced by "My text", Ok.{javascript} --> replaced by "function go()" <---- Without "{" and "}" Somebody help-me? Jacques, From Brazil.
{
return strtr($value, array(
"{" => '{{', "}" => "}}"
));
}
In template: ....{menu:k}... -> it will be parse, but if in code to be replaced have a "{" "}" caracter, it will not be parsed.
Jacques, From Brazil.