Re: SIGMA and preserve_data
| From: | Mario Gzuk | Date: | Thu, 21 Oct 2004 11:58:54 +0000 |
| Subject: | Re: SIGMA and preserve_data | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17990@lists.php.net to get a copy of this message | ||
> Hi,
>
> Mario Gzuk wrote:
> > I have also the problem with vars which contain {} itself.
> > Every text and the {} will be replaced by nothing. Also the:
> >
> > $template->setOption('preserve_data', true);
> >
> > doesnt seems to have any effect.
>
> Are you doing the setOption() call before or after setVariable()? It will have
> no effect after setVariable().
>
---SNIP----
$template =& new HTML_Template_Sigma('.');
$template->loadTemplateFile('modules/software/templates/new_software.html');
$template->setOption('preserve_data',true);
$template->setCallbackFunction('lang', 'sigma_setlang');
$template->setCallbackFunction('link', 'sigma_createlink');
$software=db_selectID('unattended_software',$id);
if ($software!=false)
{
$template->setVariable(array('id'=>$software['id'],
'software'=>$software['software'],
'regkey'=>$software['regkey')
}
---SNAP---
if now the regkey has the value \\HKLM\...\{092714hlnsdsaw29724} the
last part {092714hlnsdsaw29724} will not be shown.