Re: Pear package: html_template_flexy: How set {tag} value without having to define same variable names in controll class
| From: | Alan Knowles | Date: | Fri, 23 Feb 2007 10:08:57 +0000 |
| Subject: | Re: Pear package: html_template_flexy: How set {tag} value without having to define same variable names in controll class | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26655@lists.php.net to get a copy of this message | ||
Riku Tuominen wrote:
> Pear package: html_template_flexy
>
> Any one a have a idea how manually to set values to template variables?
>
> I mean for example if we dont know at programming time what variables
> the template is going to include. Then we cant created apropriate
> variable names in our class.
>
> I would need to do something similar to.
>
> $myValue = $myData->productName;
> $output->setTemplateVariableValue('{Title}', $myValue);
I think
$flexy->setData("Title", $myValue);
is probably what you are looking for.
Regards
Alan
>
> Best Regards
> Riku Tuominen