Page 1 of 1

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

Posted: Wed Jan 23, 2019 4:41 pm
by Stephan2
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

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

Posted: Thu Jan 24, 2019 3:34 pm
by radu_pisoi
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"/>

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

Posted: Thu Jan 24, 2019 6:55 pm
by Stephan2
Hi Radu,

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

Thanks for your quick help & kind regards,
Stephan