[Cartoweb-users] How to create requests variables

Lauber Christoph ch.lauber at geo-thun.ch
Mon Dec 15 15:20:38 UTC 2008

Hello Karol
We solved this in our projects like this:
{foreach from=$tables item=group}
{foreach from=$group->tables item=table}
{if $table->numRows > 0}
{if $table->tableTitle eq my_table_name'}
{foreach from=$table->rows item=row}
  <table class="cw3table">
         <th align="left" colspan="2"><h3>{t}Tablename{/t}</h3></th>
         <th align="left">{t}First Attribute{/t}</th>
         <td align="left">{$row->cells[0]}</td>
         <th align="left">{t}Second Attribute{/t}</th>
         <td align="left"><a href="localhost://images/"|cat:$row->cells[1]>{t}my Image{/t}</a></td>
As you see, you have to define every query by itself. Maybe not the best solution. But it works.

-----Ursprüngliche Nachricht-----
Von: Karol Briones [mailto:karolitab at gmail.com] 
Gesendet: Montag, 15. Dezember 2008 15:32
An: cartoweb-users at lists.maptools.org
Betreff: Re: [Cartoweb-users] How to create requests variables

Hello List, I have a problem with the table plugin, I need to get a specific parameter from the database for show an image, for example 
{foreach from=$row->cells item=value}
       <td><a href="localhost://images/{$value}"></a></td>

but I don't know how to get a specific parameter from the array of the table plugin, please help me.

Thanks and regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20081215/b69365a3/attachment.htm 

More information about the Cartoweb-users mailing list