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.
Hi there,
I have run a test on the clearBlocks method using the following template:
$BLOCK_one$
Here is a test one.
$BLOCK_one$
$BLOCK_two$Here is a test two.$BLOCK_two$
In this example, clearBlocks only clears the second block. It appears to not clear a block where the content is over multiple lines.
Is this a bug?
Thanks,
Lewis
Hello,
Clearblocks remove the placeholders variables that start with 'BLOCK_'. If you need to remove the whole content please use the deleteTemplateBlock method.
Please check this page:
http://www.phpdocx.com/api-documentation/templates/delete-Word-template-block-content
Regards.
Thanks!
Apologies for wasting your time.
Lewis