Categories > TinyButStrong general >

Tag for versioning

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: matben3
Date: 2016-10-26
Time: 14:51

Tag for versioning

Hi, I'm very new on thi openTBS, I'm try to do something but I don't know if it's possible. I need a solution to write text near the tag, not replacing them, because I need to pass data more time to template. I think to create a tag with white characters and dimension 1, and I used it in a table using the parallel parameter. It works, but the text generated has the same format and dimension...
There is a way to do this?
Thank you
By: Skrol29
Date: 2016-11-03
Time: 14:23

Re: Tag for versioning

Hi,

Can you give an example of what you're trying to do?
By: matben3
Date: 2016-11-03
Time: 18:12

Re: Tag for versioning

Hi, I'm trying to "re-use" more time a tag, not simply replacing it, keeping the tag hide to user. For example I have a tag [account.name], I would like to write next to him or something similar with data that I pass from php. The most close solution that I found is this. I creeated a table in the template with a column and two rows with this tag:

[c.accountname;block=tbs:cell;parallel=tbs:table]
[c.name][onload;ope=delcol;colnum=2]

then I pass this data to template:
$data = array(
array('accountname' => '[c.accountname;block=tbs:cell;parallel=tbs:table]', 'name' => '[c.name][onload;ope=delcol;colnum=2]'),
array('accountname' => 'HELLO', 'name' => 'WORLD'),
);
$TBS->MergeBlock('c', $data);

With this solution I can use again the file generated and the same tag, passing another value but I would like to keep the tag hide, so I need the code that allow me to make the tag color white and size of char 1("invisibile"), and the column that will be generated during the merge process black and regular size.

I don't know, maybe there is a simply solution but I can't find it.
Thanks for your help.
By: Skrol29
Date: 2016-11-04
Time: 13:23

Re: Tag for versioning

Is it  DOCX or an ODT ?
By: matben3
Date: 2016-11-04
Time: 15:24

Re: Tag for versioning

Now I'm trying with docx but I would like find a solution for both docx and odt, if it possible.
By: Skrol29
Date: 2016-11-04
Time: 16:42

Re: Tag for versioning

In DOCX, hiding a column is quite impossible.
See https://social.msdn.microsoft.com/Forums/vstudio/en-US/d8577f52-91ef-4945-bbe6-85ec2c02ed28/word-2010-showhide-table-columns

I've tried by setting the width to zero in the XML  : <w:gridCol w:w="0"/>. This actually hide the column but also the row design is modified (height is changed).

Reusing the result of the merging is quite difficult, especially with parameter "parallel" because fields are not in a simple block.
Why don't you keep the template and the history of data in 2 files, and having a temporary result file ? When you have new data then add them into the data file, then merge the template in order to produce a new result file thar replaces the old one.