modulo and cdata prob

A general technical discussion area for patTemplate.
Locked
wene
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 203
Joined: Sat Aug 20, 2005 1:40 am
Location: south of France

modulo and cdata prob

Post by wene » Sun Oct 30, 2005 7:47 pm

my new prob, is concerning the modulo condition.

i would like to do this :

Code: Select all

    <mos:tmpl name="rows" type="oddeven">
        <mos:sub condition="__odd">
            <tr style="background-color:#cccccc">
        <mos:sub>
        <mos:sub condition="__even">
            <tr style="background-color:#ffffff">
        <mos:sub>
                <td>{ROW_A}</td>
                <td>{ROW_B}</td>
            </tr>
    </mos:tmpl>
but pt refuses it.
it tells me that i can't add cdata to the template...

so, i have to use :

Code: Select all

    <mos:tmpl name="rows" type="oddeven">
        <mos:sub condition="__odd">
            <tr style="background-color:#cccccc">
                <td>{ROW_A}</td>
                <td>{ROW_B}</td>
            </tr>
        <mos:sub>
        <mos:sub condition="__even">
            <tr style="background-color:#ffffff">
                <td>{ROW_A}</td>
                <td>{ROW_B}</td>
            </tr>
         <mos:sub>
    </mos:tmpl>
do you know a way to do what i need ? or do i have to forget it and keep the second solution ?

alwarren
Joomla! Guru
Joomla! Guru
Posts: 527
Joined: Fri Aug 19, 2005 9:27 am

Re: modulo and cdata prob

Post by alwarren » Mon Oct 31, 2005 3:50 am

wene wrote: my new prob, is concerning the modulo condition.

Code: Select all

    <mos:tmpl name="rows" type="oddeven">
        <mos:sub condition="__odd">
            <tr style="background-color:#cccccc">
        <mos:sub>
        <mos:sub condition="__even">
            <tr style="background-color:#ffffff">
        <mos:sub>
                <td>{ROW_A}</td>
                <td>{ROW_B}</td>
            </tr>
    </mos:tmpl>
Change to . It's easy to overlook and I too have received the cdata error when I forget the "/".
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW

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

Re: modulo and cdata prob

Post by wene » Mon Oct 31, 2005 8:47 am

sorry, i have forgotten to include the "/" when i edited the post, but i use in my real code.
i have checked the prob, and i confirm, the same error :
No cdata is allowed inside a template of type modulo

alwarren
Joomla! Guru
Joomla! Guru
Posts: 527
Joined: Fri Aug 19, 2005 9:27 am

Re: modulo and cdata prob

Post by alwarren » Tue Nov 01, 2005 3:53 am

I had the same problem and it was a template that didn't have a closing tag. Get all your template tags nicely indented and go through to make sure you're not missing a closing tag or have one out of place.
Al Warren
This ain't my first rodeo. Red Foreman says it best.
CQDX de WR5AW


Locked

Return to “patTemplate”