When investigating why my custom PDF template stopped loading its attachments when exporting a page, after an upgrade (Custom PDF template broken after upgrade to 14.10.18), I learnt that doc
recerences the document being processed, that is, if page-A is the content and page-B is the PDF template, doc written in B references A.
Now, consider that it was my first pdf template and at the same time the first velocity script I’ve ever writter.
And that the explanations and examples mflorea gave me were totally clear.
Though this meant that:
- in my custom template I couln’t get a reference to the document itself;
- I had to pick the right complete path (an extra
.WebHome
is needed beside the path in the browser); - moving the template under another path would break its usage in an Export.
Would it make sense to add another variable to reference the document the script belongs to, beside the document being processed?