Forum


Replies: 11   Views: 5624
Problem with blocks
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 legalvision  · 16-10-2014 - 04:09

We are evaluating phpdocx and have come across the same issue as kdurolek outlined in "Problem 1". Here is an example line of text in our template: Signed, sealed and delivered by XYZ $BLOCK_1A$ (ABN $1B$) $BLOCK_1A$ If the 1B variable is empty, we need to remove the "(ABN $1B$)" text from this line, so it reads: Signed, sealed and delivered by XYZ If we do a simple test by using this code: $docx->deleteTemplateBlock('1A'); The entire line of text is remove (not just the ABN... part). Is there a way around this, or a different function/method we should be using?