Replies: 1   Views: 3776
Block paragraphs in template
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 rolandawemo  · 04-08-2014 - 07:51

Hello, I have a letter template with several optional paragraphs. The content of these paragraphs does not change, hence it would make sense to have them as block paragraphs of the following form $BLOCK_paragraph$ Test Paragraph $BLOCK_paragraph$ Is it possible to have functionality like this where the block can be deleted with "deleteTemplateBlock" if not need an kept otherwise. The problem with keeping the blocks is that the variables are not deleted accordingly. Regards, Roland

Posted by rolandawemo  · 04-08-2014 - 08:24

Hello, I may have discovered the solution to my problem. Simply calling "clearBlocks" removes ONLY the block variables which have not been previously deleted with a call to "deleteTemplateBlock". I will go ahead and take that as the correct answer unless there is a better suggestion. Regards, Roland.