By: Nicolas
Date: 2014-05-21
Time: 17:03
|
DOCX and conditionnal display of paragraph
Hi,
I think I have a fairly simple issue, and cannot find anything simple to use on this forum.
I have a DOCX template with lots of paragraphs, and I would like some of them to be removed if and only if a variable in my php code is set to 0 for example.
Any idea how I can achieve that ? I'm trying to use the block=tbs:p element but no luck so far
example 1 :
in my php code :
$test=1
in the final document :
---------------------------
paragraph1
paragraph1
paragraph1
paragraph2
paragraph2
paragraph2
paragraph3
paragraph3
paragraph3
---------------------------
example 2 :
in my php code :
$test=0
in the final document :
paragraph1
paragraph1
paragraph1
paragraph3
paragraph3
paragraph3
---------------------------
paragraph2 is gone !
Thanks a lot,
Nicolas
|
By: Nicolas
Date: 2014-05-21
Time: 18:25
|
Re: DOCX and conditionnal display of paragraph
In case it might help someone, I have found a workaround, just put : [onshow;block=tbs:page;when [var.YOUR_VAR]=1] in a page you want to delete when YOUR_VAR!=1
|
By: Skrol29
Date: 2014-05-28
Time: 00:33
|
Re: DOCX and conditionnal display of paragraph
Ok, thanks
|
|
Posting in progress.
Please wait...
|