sujith3g / docxtemplater-link-module

:anchor: Hyperlink module for docxtemplater
https://www.npmjs.com/package/docxtemplater-link-module
MIT License
22 stars 15 forks source link

Link in pptx #6

Closed marti4ka closed 8 years ago

marti4ka commented 8 years ago

Hey @sujith3g,

thanks for the cool module! 👍 I am trying to use this module for a pptx template. However, the tag {^link} stays unchanged because this.linkManager.maxRid in the index.js is undefined. The reason is in the linkManager.js, row 26, you have hardcoded the file path file = loadFile("word/_rels/" + this.endFileName + ".xml.rels") || loadFile("word/_rels/document.xml.rels"); which is different for pptx. I guess, you should just add the ppt alternatives: file = loadFile("word/_rels/" + this.endFileName + ".xml.rels") || loadFile("word/_rels/document.xml.rels") || loadFile("ppt/_rels/" + this.endFileName + ".xml.rels") || loadFile("ppt/_rels/presentation.xml.rels");

The second part of the issue I have was on row 58: stylePath = "word/styles.xml";. Do you know which is the correct file for pptx? I am stuck on this.

Thanks in advance!

marti4ka commented 8 years ago

Hey @sujith3g, will you publish a new release 😃? Thanks, Martina

sujith3g commented 8 years ago

It is already released in npm, will add release tag here.