WebHelp Responsive: How to add a favicon with a relative file path?

Stephan2
Posts: 5
Joined: Wed Jan 23, 2019 4:11 pm

WebHelp Responsive: How to add a favicon with a relative file path?

Post by Stephan2 » Wed Jan 23, 2019 4:41 pm

Hi,

I currently have an issue with adding a favicon to a WebHelp responsive project.

When I specify an absolute path in the publishing template as follows, it works and the favicon is displayed in the browser:

Code: Select all

<parameter name="webhelp.favicon" value="C:\Users\stephan\Documents\webhelp_configuration\webhelp_template\resources\images\favicon.ico"/>
But as soon as I try to specify a relative path to the favicon file, it doesn't work any more:

Code: Select all

<parameter name="webhelp.favicon" value="resources/images/favicon.ico"/>
I've included the file in the <filepath> section, but this makes no difference:

Code: Select all

<include name="resources/images/favicon.ico"/>
Using a relative path is required for us, because later we would like to generate the Webhelp Output automatically with the DITA-OT. How can this be achieved?

Thank you in advance for your advice,
Stephan

P.S.: Im currently working with <oXygen/> XML Author 20.1, build 2018101517

radu_pisoi
Posts: 343
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: WebHelp Responsive: How to add a favicon with a relative file path?

Post by radu_pisoi » Thu Jan 24, 2019 3:34 pm

Hi,

You need to specify the type="filePath" attribute for filepath parameters. See the Publishing Template Package Contents -> Transformation Parameters section in our documentation.

Code: Select all

<parameter name="webhelp.favicon" value="resources/images/favicon.ico" type="filePath"/>
It is recommended to define only relative path in publishing template, so it will be self-contained.

An alternative mode to set a favicon in a publishing template is to use the favicon element:

Code: Select all

<publishing-template>
...
<webhelp>
...
<resources>
<css file="css/custom_styles.css"/>
<css file="css/custom_fonts.css"/>

<favicon file="images/favicon.png"/>
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Stephan2
Posts: 5
Joined: Wed Jan 23, 2019 4:11 pm

Re: WebHelp Responsive: How to add a favicon with a relative file path?

Post by Stephan2 » Thu Jan 24, 2019 6:55 pm

Hi Radu,

I've added the "filePath" attribute to the parameter and now it works! :D

Thanks for your quick help & kind regards,
Stephan

Post Reply