Categories > TinyButStrong general >

bullet points in a docx

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Meri
Date: 2016-09-01
Time: 17:16

bullet points in a docx

Hello,

I have an array with 1 field filled with a ';' seperated list of items.
Like:
array (
product => 'name of product',
items => 'nice design; easy to handle; easy to clean;',
);
is there a way to convert these values in docx as a bullet point list?
By: Skrol29
Date: 2016-09-13
Time: 12:21

Re: bullet points in a docx

Hi,

This cannot be done directly with TBS/OpenTBS.

You should edit you data before merging in order to convert the 'items' value into a PHP array. And then you can merge it with bullets using an automatic sub-block.
See :
http://www.tinybutstrong.com/manual.php#html_block_subauto
By: Meri
Date: 2016-09-14
Time: 11:04

Re: bullet points in a docx

thx for the reply.

I now have:
array (
id => 1,
product => 'name of product',
artikelnummer => '1234',
items => array( 'nice design','easy to handle','easy to clean'),
);
And in my template:
[product.id;block=begin;sub1=item]
[product.product;headergrp=product]
[product.artikelnummer]

[product_sub1.val;block=tbs:listitem]
[product.id;block=end]


de code of in the template is in a table. Is there a way to delete the row for item is the array is empty?
By: Skrol29
Date: 2016-09-15
Time: 17:43

Re: bullet points in a docx

It would be easier if you use the relative syntax for block :

[product.id;block=tbs:p+tbs:p;sub1=item] [product.product] [product.artikelnummer]¶
* [product_sub1.val;block=tbs:listitem] [product.id]¶
By: Meri
Date: 2016-09-16
Time: 17:25

Re: bullet points in a docx

Does that work in a docx or odt file?
the code:
{code}
[product.product;headergrp=product]
[product.artikelnummer]

[product_sub1.val;block=tbs:listitem]
{/code}
is in a table in a docx file before the table "[product.id;block=begin;sub1=item]" and after the table "[product.id;block=end]"

i need to delete a row in that table when listitem is empty