Forum


Replies: 2   Views: 3487
Cleantemplatevariable() broken
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 metricbpo  · 11-10-2013 - 22:56

foreach($docx->getTemplateVariables()['document'] as $unused)



        $docx->cleanTemplateVariable($unused, 'block');



 



One would expect the unused variable $SOME_VAR$ to be removed from the document like in the example, however the output becomes $$. Note, this works as expected with inline, just not with block. If the block cannot be identified correctly, then the expected result would be for the function to act like inline and remove the $$ also.



 


Posted by jorgelj  · 14-10-2013 - 09:22

Hello,



We'll check that issue to be solved.



Regards.