Template type Condition error

A general technical discussion area for patTemplate.
Locked
DaesDemon
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Nov 23, 2005 1:22 pm

Template type Condition error

Post by DaesDemon » Thu Jan 19, 2006 8:05 pm

Hello again,
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>
When i feed it with:

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);
I get this error:
[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?
Last edited by DaesDemon on Thu Jan 19, 2006 8:07 pm, edited 1 time in total.

wene
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 203
Joined: Sat Aug 20, 2005 1:40 am
Location: south of France

Re: Template type Condition error

Post by wene » Thu Jan 19, 2006 10:48 pm

try :
.......
instead of
<mos:tmpl sub....

DaesDemon
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Nov 23, 2005 1:22 pm

Re: Template type Condition error

Post by DaesDemon » Fri Jan 20, 2006 1:11 am

Thank you wene , that was the error.
That works great now.


Locked

Return to “patTemplate”