Another basic patTemplate problem
I try to use a condition template, but i get some problems with.
My template code is:
Code: Select all
<table>
<tr>
<mos:tmpl name="titles" type="condition" conditionvar="visible">
<mos:tmpl sub condition="true">
<th>{VALUE}</th>
</mos:tmpl>
</mos:tmpl>
</tr>
<table>
Code: Select all
$tmpl->clearTemplate('titles');
$titles = array();
foreach ($fields as $field)
{
$title = array();
$title['value'] = $field->getLabel();
$title['visible'] = $field->isVisible($field);
$titles[] = $title;
}
$tmpl->addRows('titles',$titles);
[quote="patTemplate"]pat-Notice: No cdata is allowed inside a template of type condition (cdata was found in titles) in list.tmpl.html on line 14[/quote]
and it doesn't display the template.
What do i do wrong?