By: nawbacan
Date: 2014-03-26
Time: 13:26
|
Sub bloc with à listHello everyone,
I work for some day on this problem, maybe you can help. My application generate a Docx document which contains for each page informations about one inscriptions. A the end, I have a document with n pages for n inscriptions. the php side :
the tag on the template
My problem is that I want to add a list of Informations (n evaluations) for each inscriptions. I try with the function mergebloc like that : $TBS->MergeBlock('notes', $notes_detail); , but every inscriptions have the same evaluation. I try to construct an array, but I don't understand how to get the datas of the array without using Mergblock. Thanks in advance for your help. |
|||
By: Skrol29
Date: 2014-03-26
Time: 22:44
|
Re: Sub bloc with à listHi,
You have to use sub-blocks. The dimpliest is to save the evaluations as an array in each inscription row.
See for more info aobut automatic sub-blocks : http://www.tinybutstrong.com/manual.php#html_block_subauto The other solution is sub-blocks with dynamic queries. It needs two MergeBlock() http://www.tinybutstrong.com/manual.php#html_block_dynsb |
|||
By: nawbacan
Date: 2014-03-27
Time: 15:33
|
Re: Sub bloc with à listHi,
Thanks for your answer ! I try
with I have an error. so I try this to peut each evaluation in each inscription row.
It's better. But in the template, with the system of automatic sub-block, I have one more problem. The tag is not interpreted. I have something like that
|
|||
By: Skrol29
Date: 2014-03-28
Time: 14:10
|
Re: Sub bloc with à listHi
> The first line it's ok. But not the second. Can you be more precise on what is happening ? In your HTML snippet, the bound of the sub-block should not go over the main block information, or it may behave logically but unexpectedly for you. You should something like:
|
|||
By: nawbacan
Date: 2014-03-31
Time: 10:18
|
Re: Sub bloc with à list>> The first line it's ok. But not the second.
>Can you be more precise on what is happening ? My problem is that the second line isn't interpreted. The tag isn't replaced by the right value. The first line :
The second line :
You talk me about HTML snippet. I put the tag directly in a template called "Template.docx". I open it with LibreOffice, and write in the document my tags. It is a problem for the sub-block ? |
|||
By: Skrol29
Date: 2014-03-31
Time: 23:10
|
Re: Sub bloc with à list>You talk me about HTML snippet. I put the tag directly in a template called "Template.docx".
>I open it with LibreOffice, and write in the document my tags. "block=tr" cannot work in a DOCX template. It should be "block=tbs:row". >The second line : [inscription_sub1.val;block=tr] >I have the code in the document generation. I didn't understand why It don't work, The special keyword "val" is supposed to display the value of the item in the PHP array. Can you tel how is the data structure for your records ? |
|||
By: nawbacan
Date: 2014-04-01
Time: 10:12
|
Re: Sub bloc with à listFor each record, I have the following structure :
Each record is stocked in a main array :
I want to thanks you for the time you take. I'm very confused about this problem. |
|||
By: Skrol29
Date: 2014-04-03
Time: 01:21
|
Re: Sub bloc with à listWhat happens if you build a table in the DOCX like this :
|
|||
By: nawbacan
Date: 2014-04-03
Time: 10:05
|
Re: Sub bloc with à listI try with this construction.
The problem is always de same, the part
|
|||
By: Skrol29
Date: 2014-04-05
Time: 01:03
|
Re: Sub bloc with à listIt worked fine for me.
My PHP snippet:
|
|||
By: nawbacan
Date: 2014-04-08
Time: 10:12
|
Re: Sub bloc with à listI have always de same problem : the line
I continue to search. Maybe It's because I work with LibreOffice for the template. Maybe, It's because I work with a Mac. |
|||
By: Skrol29
Date: 2014-04-08
Time: 22:22
|
Re: Sub bloc with à listThere may be a thing to check: cut the TBS field, paste it in a text editor, then copy it from the text editor and paste it again in the template.
This way all text formating will be drop. It it does work, can you send the template to me ? |
|||
By: Skrol29
Date: 2014-04-10
Time: 01:51
|
Re: Sub bloc with à listThanks for the file you sent to me.
In your template, the sub-block is not recognized by TBS because : The block "inscription" is defined with the first TBS field containing parameter "block". So, replace:
with:
And you also have to put the field [inscription_sub1.val;block=tbs:row] into a real table cell, other wise you'll have an error. |
|||
By: nawbacan
Date: 2014-04-11
Time: 15:10
|
Re: Sub bloc with à listHi Skrol,
I juste want to thank you very much for your help ! It's ok now. Thank you ! |