Categories > TinyButStrong general >

issue with dynamic tables

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: John
Date: 2011-02-11
Time: 16:29

issue with dynamic tables

I'm using TBS right now to dynamically create a table of products. My business logic is set so that my product pages will have four products per page. I'd like each page to have a table with two rows, each with two cells. 

    Using code like this:
[product_links.val;block=td;htmlconv=no]
leads to a table with one row and four cells.
    Using this code:
[product_links.val;block=tr;htmlconv=no]
leads to a table with four rows with one cell each.

    Is it possible to format a table dynamically like this?
By: Skrol29
Date: 2011-02-11
Time: 17:05

Re: issue with dynamic tables

> Is it possible to format a table dynamically like this?

Like what ? Two rows and two cells ?

It's possible to display your data on two columns, and continuing on the next row. This is the serial mode. You can go and see an in-line example. It's the example named "Display in columns (serial)".

It's also possible to make dynamic columns, but I don't think it is interesting for your problem. There is also an in-line example named "Dynamic columns".
By: John
Date: 2011-02-11
Time: 19:13

Re: issue with dynamic tables

Ok, I was sure there was a way to do it but didn't know the serial keyword was what I needed.

So in my example do I change to code to
[product_links_1.val;block=td;htmlconv=no]
[product_links_2.val;block=td;htmlconv=no;serial]


Will this let me create two rows with two cells each?
By: Skrol29
Date: 2011-02-13
Time: 10:49

Re: issue with dynamic tables

It's rather like this:
<tr>
  <td>[product_links_1.val;block=td;htmlconv=no][product_links;block=tr;serial]</td>
  <td>[product_links_2.val;block=td;htmlconv=no]</td>
</tr>
By: John
Date: 2011-02-14
Time: 17:28

Re: issue with dynamic tables

Thank you. It's hard to figure out how to use some of this functionality when I'm not sure if I'm apply TBS's tools properly.