[quote=gowrisankarn]
My Template:
$BLOCK_A$
TABLE COL1 COL2
$VAR_R_MAN$ $VAR_R_COST$
$BLOCK_A$
Code Snippet:
$docx->deleteTemplateBlock('BLOCK_A');
...
$docx->clearBlocks();
Output:
Doesn't delete the table within the block. I see below in my generated doc.
TABLE COL1 COL2
$VAR_R_MAN$ $VAR_R_COST$
Any suggestions please?
[/quote]
My mistake.
NO : $docx->deleteTemplateBlock('BLOCK_A');
YES : $docx->deleteTemplateBlock('A');
It is mentioned in one of the examples that the prefix "BLOCK_" will be omitted from the argument. Would be nice if this is document here http://www.phpdocx.com/api-documentation/templates/delete-Word-template-block-content.
Thank you.