Forum


Replies: 5   Views: 2635
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