
March 28th, 2007, 06:03 PM
|
|
|
|
Join Date: Apr 2007
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
FLEXY - possible to "parse" tpl file twice before output?
Need some help with the Pear Flexy template system.
I have some form elements that get's their name when the tpl file is parsed, all of the names and id's have a name and to that name I add a id.
The problem is when I try to add more elements to the form based on theri id.
<select name="foo{id}" id="foo{id}" selected="selected" >
I tried with this code, but it fails because the id in the tpl is not "parsed" and the id it looks for in the tpl file has not got it's new id yet.
$this->selectName = 'foo' . $id;
$this->elements[$this->selectName] = new HTML_Template_Flexy_Element;
foreach ($types as $key => $value){
$this->elements[$this->selectName]->setOptions(array($key => $value));
}
Any solutions? Is it possible to add the id to to tpl file first, and then add the elements?
|