Relative linking for header logo in individual pages of classic webhelp not working

Post here questions and problems related to editing and publishing DITA content.
prateek_satpathy
Posts: 1
Joined: Fri Oct 05, 2018 11:11 am

Relative linking for header logo in individual pages of classic webhelp not working

Post by prateek_satpathy »

Hi,
I am trying to generate classic webhelp output with a header logo for all pages.I have used a custom CSS where the logo is mentioned and the path for the logo is the root folder.

h1.before{
content : url("./logo.png");
}

But the issue is for the immediate concepts and task folder it is able to fetch and display the logo,not for the sub folders. So relative linking is not working. Please help

Thanks
ionela
Posts: 402
Joined: Mon Dec 05, 2011 6:08 pm

Re: Relative linking for header logo in individual pages of classic webhelp not working

Post by ionela »

Hello,

I've tested and you could achieve this using a custom CSS file with the following CSS code:

Code: Select all

h1:before{
content: url('logo.png');
}
More information about how to use a custom CSS can be found in our user manual: Referencing the Custom CSS
Taking into account that the image URL should be relative to the custom CSS file, and the CSS file will be copied to the root directory of the generated output you also need to use the webhelp.custom.resources parameter to point to a directory that contains only your logo.png file. This way, the png file (and all the resources located in that directory) will be copied to the root directory of the published output. Given this it is recommended to create a directory that contains only the logo file.
You can find here more details about webhelp.custom.resources parameter: Copying Additional Resources to Output Directory

Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
Post Reply