How to customize webhelp

dagoss
Posts: 24
Joined: Fri Apr 05, 2013 11:01 pm

How to customize webhelp

Post by dagoss »

I'm not sure I understand the proper way to customize basic things for the docbook webhelp output in Oxygen.

For our PDF, I just point the transformation scenario to a transformation layer XSL file, which imports the stylesheet from the docbook distribution. For webhelp, the transformation scenario is pointing to an XML build file, not an XSL. I don't know how/where to place customizations.

Is the appropriate process to copy the frameworks\docbook\xsl\com.oxygenxml.webhelp\" directory, customize it directly, and point to that as a custom build file? I could probably fumble my way through that, but I want to make sure that's not a completely backwards way to go about this. Right now, I only want to add a custom css file (for styling the actual content), add our logo, put our contact information in the footer--just basic stuff.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How to customize webhelp

Post by sorin_ristache »

Hello,
dagoss wrote:Is the appropriate process to copy the frameworks\docbook\xsl\com.oxygenxml.webhelp\" directory, customize it directly, and point to that as a custom build file?
That is one way of customizing the Docbook Webhelp transformation. The other one is to just add your Docbook customization layer (custom XSLT stylesheet) in the same folder as the Docbook Webhelp stylesheets, that is [Oxygen-install-dir]\frameworks\docbook\xsl\com.oxygenxml.webhelp. If you choose the first way (create your customization in a copy of the frameworks\docbook\xsl\com.oxygenxml.webhelp directory) please make sure you modify all the href attributes on all xsl:import and xsl:include elements from chunk-custom.xsl so that the href values point to the original Docbook XSLT stylesheets from directory [Oxygen-install-dir]\frameworks\docbook\xsl.
dagoss wrote:Right now, I only want to add a custom css file (for styling the actual content), add our logo, put our contact information in the footer--just basic stuff.
A custom CSS file can be set with the parameters html.stylesheet and html.stylesheet.type of the Docbook Webhelp transformation, you don't need a custom XSLT stylesheet for that. Depending on the position for your logo image, I think a logo may be added also from CSS, without a custom XSLT stylesheet. For a custom header/footer you need to override some named XSLT templates from the Docbook XSL stylesheets, you can find some details here.


Regards,
Sorin
dagoss
Posts: 24
Joined: Fri Apr 05, 2013 11:01 pm

Re: How to customize webhelp

Post by dagoss »

Thanks for your help. This is what I have a question about:
sorin wrote:A custom CSS file can be set with the parameters html.stylesheet and html.stylesheet.type of the Docbook Webhelp transformation, you don't need a custom XSLT stylesheet for that.
.

Setting those two attributes was actually the first thing I did, but it doesn't look like those parameters are being carried over. If I look at my output, there's only one <link> tag and it's for tocWDiv.css, not the one I defined.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How to customize webhelp

Post by sorin_ristache »

Hi dagoss,

The chunk HTML files created by the Docbook Webhelp transformation in the output dir (oxygen-main.html, ar01s01.html, ar01s02.html, etc) contain the reference to the CSS stylesheet from the html.stylesheet parameter but the page that results by injecting the chunk HTML file with Ajax code in the right side panel (the left side panel contains the Content and Search tabs), that is the index.html page, does not contain this CSS link anymore. We will check the page load in the Ajax code and we will correct it.

I suggest using the frameset version of the Webhelp output (the index_frames.html page) until we fix the problem in index.html. The CSS link works correctly in the frameset version (the index.html file).


Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: How to customize webhelp

Post by sorin_ristache »

Hi,
dagoss wrote:Setting those two attributes was actually the first thing I did, but it doesn't look like those parameters are being carried over. If I look at my output, there's only one <link> tag and it's for tocWDiv.css, not the one I defined.
The problem was fixed and included in the latest maintenance build of version 15.0. You can just download and install the current Oxygen build from the Download page.


Regards,
Sorin
Post Reply