Forum


Replies: 2   Views: 690
Replace variable with page number as merge field
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 admin  · 06-07-2022 - 08:22

Hello,

Yes, it's a limitation of the old version you are using. We recommend you upgrade to the latest release; you can test this same method using the trial package (https://www.phpdocx.com/download_trial) before upgrading.

Using phpdocx 7, to keep the field tags included in addPageNumber you need to do a block type replacement instead on the inline type replacement your code is using:

"type" => "block"

Regards.