Cannot add document template via framework extension script

Having trouble installing Oxygen? Got a bug to report? Post it all here.
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

Cannot add document template via framework extension script

Post by kai_weber »

In Oxygen Editor v25, I cannot add templates to a framework via framework extension script, as described in your documentation.

I tried all kinds of combinations of settings, @inherit="all" / "none", @path with and without a trailing "/", with and without @position attributes, all based on something as simple as this:

Code: Select all

<documentTemplates inherit="none">
  <addEntry path="${framework}/templates/" position="after"/>   
</documentTemplates>
I restarted the oXygen editor many times, after every change I made to the extension script file, and I do have XML file(s) in the configured folder ${framework}/templates (trying with and without an additional properties file).

Whatever I do, I never get the templates from this framework/folder visible in the new file dialog of oXygen. Do I miss something obvious or could this be a bug?

(And by the way: The ${framework} variable must be working corrctly in principle, because I have a catalog file reference which is working without any problems:

Code: Select all

  <xmlCatalogs inherit="all">
    <addEntry path="${framework}/catalog.xml"/>
  </xmlCatalogs>
)

Here's a screenshot of my setup:
Image
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Cannot add document template via framework extension script

Post by alex_jitianu »

Hi,

Some properties have URL values and other have file path ones. For templates, the path must be a file path so you need to use ${frameworkDir} or just leave the path relative and it will be resolved relative to the script location. I will add an issue to handle these nuances automatically, it took awhile for me too to realize what was happening!

Code: Select all

<documentTemplates>
    <addEntry path="${frameworkDir}/documentTemplates"/>
  </documentTemplates>
Best regards,
Alex
kai_weber
Posts: 24
Joined: Tue May 05, 2020 9:57 am
Location: Tübingen, Germany
Contact:

Re: Cannot add document template via framework extension script

Post by kai_weber »

Hello Alex,

oh yes, that works, thanks for that hint. I'll try to read parameter type instructions more carefully in the future.

Best regards,
Kai
Post Reply