Forum


Replies: 10   Views: 4369
Erreur cleantemplatevariable
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 nikkyb8  · 18-11-2013 - 18:07

Hello,



I tryto usethis function:

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

I still have$$ instead of$VARIABLE$

The variabledoes not disappear...



Here is my code:

CreateDocx$docx= new();

$docx->AddTemplate('/var /www /docx/ examples/ files /TemplateClean.docx');

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

$docx->createDocx('/tmp /' $_SESSION["username"]'_'$ _SESSION["user_id"]'/''example_clean'.....)



Youknowor thatcome from?


Posted by jorgelj  · 19-11-2013 - 08:57

Hello,



Try using 'inline' options instead of block. This is:



$ docx-> cleanTemplateVariable ('VARIABLE', 'inline');



Regards.


Posted by nikkyb8  · 19-11-2013 - 10:22

Hello,



I havethe following:



Hi,

$mavarible$


goodbye



If I use'block':

Hi,

$$

goodbye



If I use'inline':

Hi,



goodbye




It does not deletethe line break...

Do you knowhow come?



 


Posted by jorgelj  · 20-11-2013 - 09:26

Hello,



We have found a bug that will be solved on the next version. Please open CreateTemplate.inc file and change line 882, adding $variableName instead of $var.



Regards.


Posted by nikkyb8  · 29-11-2013 - 08:53

Hi, i have this in line 882 :



 $xmlWP = $domDocument->getElementsByTagNameNS(

            'http://schemas.openxmlformats.org/wordprocessingml/2006/main',

            'p'

        );



What i have to change ?


Posted by jorgelj  · 29-11-2013 - 12:47

Hello,



What version of PHPDocX are you using? 3.3, 3.5, 3.6...



Regards.


Posted by nikkyb8  · 29-11-2013 - 18:05

How can i know it ?


Posted by jorgelj  · 02-12-2013 - 09:26

Hello,



You just need to open Readme.txt file.



Regards.


Posted by nikkyb8  · 03-12-2013 - 12:15

It's



====PHPDocX 3.5.1 by 2mdc.com====



 


Posted by jorgelj  · 03-12-2013 - 19:35

Hello,



Please download the lastest version from MYPHPDOCX page after login.



Regards.