• Community
  • Products
  • Confluence
  • Questions
  • How to format the Extract pageTreeWordExport.vm file (from the Confluence Pagetree Word Exporter) to have nicely formatted Word docs from the Confluence export?

How to format the Extract pageTreeWordExport.vm file (from the Confluence Pagetree Word Exporter) to have nicely formatted Word docs from the Confluence export?

Hi, I have just installed this macro and reading the doco on it, it says "Word template can be customized. Extract pageTreeWordExport.vm from the jar file, create directory $CONFLUENCE_HOME/WEB-INF/classes/templates and copy the files here. After any customization you make to this file, Confluence must be restarted." See: http://www.meta-inf.hu/wiki/display/PLUG/Confluence%20Pagetree%20Word%20Exporter

Can anyone explain to me how to go about this as I have no idea and there doesn't seem to be any doco out there? Thanks



2 answers

If anyone can figure this out I would also like some more guidance. Here is what I tried:

  1. Open 'pagetree-word-exporter-plugin-3.0.2.jar' with WinRAR or 7-Zip
  2. Access templates from \templates\
    1. exportword.vm
    2. pageTreeWordExport.vm
  3. Edit the .vm file using notepad (you can use word but it'll add a bunch of useless metadata)
  4. Replace the file in the .jar and reload the plugin in Confluence.

I'm guessing the 'exportword.vm' is the top page and 'pageTreeWordExport.vm' is the subtree pages. I've done these steps without much luck.  However I'm trying to get the Title to display on the subtree pages.  The content will display but not the page title.  It looks like it should but doesn't.

I changed this line:

<h1>$pageContent.title</h1>

to this:

<h1>$!pageContent.title</h1>

and still no go.

 

 

Well I confirmed that modifying the 'exportword.vm' works.  Any changes to this file will display in the exported document.  However changes made to the pageTreeWordExport.vm will not change anything in the subpages that are exported...  Not sure what is going on there... probably has something to do with this:

$CONFLUENCE_HOME/WEB-INF/classes/templates

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Confluence

What are your project planning tips?

Hello Community,  Jessica here from the Confluence product marketing team! Today I wanted to get your takes on project planning –– what works, what doesn’t, how do you know if you’re doing it r...

293 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you