Forum


Replies: 2   Views: 3474
Multiple levels of bullet points with addtemplatevariable
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by zevans  · 02-04-2013 - 19:34

I have a variable in a template call it $testvar$ preceded by a bullet in the word docx file. I can replace this with a bulleted list on one level, but I cannot figure out how to do multiple levels of bullets.

This gives me one level of bullets:

$docx->addTemplateVariable(
array(
array(
'testvar' => 'Product A',
),
array(
'testvar' => 'Product B',
),
array(
'testvar' => 'Product C',
),
),
'list',
$settings
);

It would be great to do multiple levels of bullets something like this. Is this possible?

* Product A
* Product Feature 1
* Product Feature 2
* Product B
* Product C
* Product Feature

Is HTML the only way to replace that template variable?

Thanks