Forum


Replies: 4   Views: 546
How to read blocks from a first template and to insert them when needed in new doc
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 dremoussenard  · 03-08-2023 - 15:46

Hello,

the question contains two parts : is it possible and if yes, with which license.

We have a main template, and a second which contains a few block (or part of the document we can copy and keep in a variable).

We would like to open the template, doing some variables replacement, and then, depending of some data values, adding a few blocks (with variables replacement too) in the main doc.

The insertion of blocks is depending of data. As an example, we could find 5 blocks B1, B2, B3, B4 and B5 in a block template file. And one main template MT1

After creating a new doc with MT1, reading all the 5 blocks in the block template, we could insert B1 B1 B4 B1 B1 B3 B2 B1 B1 at the end of the new doc.

Is that possible?
(we alfready have a advanced license, and we could buy one more license).
Thank you,

Didier