Forum


Replies: 11   Views: 5650
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 kdurolek  · 03-06-2014 - 13:47

I'm currently testing trial version by I'plan to buy corporate version of product (Maybe problem lies in a version I use). I have question about template blocks. Template example: $BLOCK_OVER18$Example text 1$BLOCK_OVER18$$BLOCK_LESS_THEN_18$ Example text 2$ BLOCK_LESS_THEN_18$ Problem 1) Code: $docx->deleteTemplateBlock('OVER18'); $docx->clearBlocks(); I expected to see text: "Example text 2" But I see blank line I can do this trick do achieve what I expected (not use clearBlocks). But it's not what I expect and what I found in docs. $docx->deleteTemplateBlock('OVER18'); $docx->cleanTemplateVariable('BLOCK_LESS_THEN_18','inline'); Problem 2) When my expression expands to multiple lines in Word (Like in my example 2 lines: some kind of conditional content) and I remove all block except f.e. one and I remove all block tags then I stay with 2 lines instead content from 1 block which fits to one line. Problem 3) When I remove block I stay with blank line. I found similar topic on forum but without answer. Please help me to achieve what I want.