Categories > OpenTBS with DOCX >

Syntax required - Dynamic Table with Heading

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Chets
Date: 2014-05-14
Time: 08:04

Syntax required - Dynamic Table with Heading

Hello,

I am new in OpenTBS and i want o/p like below in document so what i have to written in document so it will display o/p like this.

1) Responsive Website Front-End Design (>> title)
    Sr. no   |    title     |      comment (>> this is table structure and data will be multiple)

2) Admin Design (>> title)
    Sr. no   |    title     |      comment (>> this is table structure and data will be multiple)

3) ....

Please help me.

Thanks in Advance.
By: Skrol29
Date: 2014-05-26
Time: 14:31

Re: Syntax required - Dynamic Table with Heading

Hi Chets,

You could try with something like this.

DOCX :
[myblock.title;block=tbs:p+tbs:table;sub1=titles]
   [myblock_sub1.name;block=tbs:row;]  |  [myblock_sub1. title]  | [myblock_sub1.comments]

PHP:
$TBS->MergeBlock('myblock', $data);

At the template side, your have the first line on a single DOCX paragraph, followed by a single table.
So the main block is defined upon those two elements together (block=tbs:p+tbs:table).

This snipped uses an automatic sub-block (sub1=...)
See http://www.tinybutstrong.com/manual.php#html_block_subauto