[Templates] Re: SELECT CASE question

[prev] [thread] [next] [Date index for 2004/11/30]

From: Robert
Subject: [Templates] Re: SELECT CASE question
Date: 16:47 on 30 Nov 2004
"Kenneth Ekdahl" <sensei@xxxxxx.xx> wrote in 
message news:20041130162304.GA27139@xxxxxx.xx...
>>
>>          <tr id="trcol[% IF loop.count % 2; "1"; ELSE; "2"; END %]">
>>             <td>[% report.DSTRCT_CODE %]</td>
>>             <td>[% report.WORK_ORDER %]</td>
>>             <td>[% report.CREATION_DATE %]</td>
>>             <td>[% report.LAST_MOD_DATE %]</td>
>>             <td>[% report.ORIGINATOR_ID %]</td>
>>             <td>[% report.SURNAME %]</td>
>>             <td>[% report.FIRST_NAME %]</td>
>>           </tr>
>
> I donät think that would be valid html?
> All "id" must have unique values.. :-)
>
>         <tr class="trcolstyle [% IF loop.count % 2; "odd"; ELSE; "even"; 
> END %]">
>
> I believe it's ok with several classes for an element, the styles will
> be merged in a hopefully predicable way, at least that have worked well
> for me when I ha tried it.
>
They do become unique values. All even rows are trcol1 and all odd rows are 
trcol2. I modified my code per Mr. Schwartz's suggestion (thanks!) and it 
works like a charm.

I have not gotten the other portion (when nothing is returned from the SQL) 
statement to work though.

Robert 




_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] SELECT CASE question
Robert 13:54 on 30 Nov 2004

Re: [Templates] SELECT CASE question
merlyn (Randal L. Schwartz) 14:34 on 30 Nov 2004

[Templates] Re: SELECT CASE question
Robert 15:00 on 30 Nov 2004

Re: [Templates] SELECT CASE question
Kenneth Ekdahl 16:23 on 30 Nov 2004

[Templates] Re: SELECT CASE question
Robert 16:47 on 30 Nov 2004

Re: [Templates] SELECT CASE question
Cees Hek 14:43 on 30 Nov 2004

Re: [Templates] SELECT CASE question
Dave Cross 14:47 on 30 Nov 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52