Relative folder path for webhelp.custom.resources parameter in a publishing template?

Graham Hannington
Posts: 48
Joined: Mon Jun 13, 2016 11:23 am

Relative folder path for webhelp.custom.resources parameter in a publishing template?

Post by Graham Hannington » Tue Oct 06, 2020 9:01 am

I am using Oxygen XML Author 22.1 to generate WebHelp Responsive output.

From the Oxygen documentation topic "How to Copy Additional Resources to Output Directory":
You can copy additional resources (such as JavaScript, CSS, or other resources) to the output directory either by using an Oxygen Publishing Template or the webhelp.custom.resources parameter.
For the second option, that documentation topic refers specifically, and only, to setting the parameter in the Oxygen user interface, not a publishing template (.opt file).

Setting this parameter in an .opt file to a folder path relative to that .opt file (where custom-resources is a folder in the same folder that contains the .opt file):

Code: Select all

<parameter name="webhelp.custom.resources" value="custom-resources"/>
does not copy the files in custom-resources to "to the root of the WebHelp output directory". In fact, as far as I can tell, specifying that parameter in the .opt file, with that relative folder path, has no effect.

Setting the parameter via the Oxygen UI, with an absolute path, as described in that doc topic, works. So does setting the parameter in the .opt file with that absolute path.

In my .opt, I currently use:

Code: Select all

<fileset>
  <include name="resources/**/*"/>
</fileset>
which copies everything under resources to [output root folder]\oxygen-webhelp\template\resources, rather than directly to the output root folder.

This mean that I need to specify other parameter values with that "oxygen-webhelp\template" path, like this:

Code: Select all

<parameter name="webhelp.logo.image" value="oxygen-webhelp/template/resources/images/logo-white.svg"/>
It's a minor niggle, but I'd hoped to copy resources to the output root folder, with the resulting shorter paths, rather than that relatively deeply nested "oxygen-webhelp/template" folder, without having to specify an absolute folder path for webhelp.custom.resources.

Thoughts?

alin
Site Admin
Posts: 201
Joined: Thu Dec 24, 2009 11:21 am

Re: Relative folder path for webhelp.custom.resources parameter in a publishing template?

Post by alin » Tue Oct 06, 2020 2:56 pm

Hello,

You should instruct the Publishing Template that the parameter's value represents a relative file path by setting the @type="filePath" attribute on the <parameter> element.

Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply