Forum


Replies: 5   Views: 2461
Generating a multiple column layout below heading
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 ckightley92  · 28-03-2018 - 11:55

Hi,

So i'm currently facing an issue when trying to modify a template word doc.

What i'm currently trying to do is to loop through all articles from our database, and create a header for each of these articles with the title in a 1 column format. Underneath this header, i'm attempting to create a 2 column layout for the article content.

Issue: modifyPageLayout()

I'm unable to use this method to modify the $content$ pleaceholder which i'm overwriting with all the article content. When using this method, it gives the following error.

Call to a member function getElementsByTagName() on null

This is suggestive that the method isn't compatable with createDocxfFromTemplate wordFragment.

If i can't modify the wordFragment layout from a 1 to 2 column layout, how else can i achieve this solution?

I looked at creating a new docx per article and attempt to merge these. Is this possible?

Thanks

Chris

Posted by ckightley92  · 28-03-2018 - 14:57

I believe the current version in the project i'm using is 4.5 using just a general licence. Updating the version isn't currently an option. I'm just simply looking to see if this is actually possible with the current version.

Posted by admin  · 28-03-2018 - 15:58

Hello,

You need to upgrade to the latest version to be able to accomplish what you need.

Regards.

Posted by ckightley92  · 29-03-2018 - 07:53

Ok, Which licence would be required for what i'm trying to accomplish?