You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Harald Weidner <hw...@gmx.net> on 2005/11/25 14:28:18 UTC

magic tables in Embperl 2.1.0

Hello,

I have a problem concerning magic tables. In earlier days, I remeber
that the following Embedded Perl code

  [- @ary = ( [a,b], [c,d], [e,f] ) -]

  <table>
   <tr><th>Head1</th><th>Head2</th></tr>
   <tr><td>[+ $ary[$row][$col] +]</td></tr>
  </table>

the output looked like this:

  Head1  Head2
  a      b
  c      d
  e      f

However, with the same code on a current Embperl 2.1.0 release,
I get this:

  Head1  Head2
  a      b
  Head1  Head2
  c      d
  Head1  Head2
  e      f

i.e. the table header repeats with every line.

Is it possible to get the old behaviour even with the current Embperl?

Regards,
Harald


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: magic tables in Embperl 2.1.0

Posted by Gerald Richter <ri...@ecos.de>.
Hi,

> 
> I have a problem concerning magic tables. In earlier days, I 
> remeber that the following Embedded Perl code
> 
>   [- @ary = ( [a,b], [c,d], [e,f] ) -]
> 
>   <table>
>    <tr><th>Head1</th><th>Head2</th></tr>
>    <tr><td>[+ $ary[$row][$col] +]</td></tr>
>   </table>
> 

Embperl currently does not support the th tag, but you can write

   <table>
    [$if $row == 0 $]<tr><th>Head1</th><th>Head2</th></tr>[$endif$]
    <tr><td>[+ $ary[$row][$col] +]</td></tr>
   </table>


To workaround this

Gerald



 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org