Forum


Replies: 3   Views: 2164
Clone block
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 admin  · 05-02-2019 - 10:32

Hello,

Although the cloneWordContent method works correctly, we have checked your template.

The problem is that the block wrappers are using the same symbol than some contents in the element to be cloned ($), and these contents have the same words than the block name (PART INST).
 
We recommend you to use a unique symbol to set block placeholders:
 
$docx->setTemplateSymbol('#');

$docx->cloneBlock('PART_INST');

$docx->setTemplateSymbol('$');

or use unique placeholder names for blocks.

Regards.