Page 1 of 1

customize webhelp topic page

Posted: Wed Nov 20, 2019 11:26 am
by catherine
Hi,
I saved all of my Scenario settings as a custom publishing templates for the webhelp output.
I want to customize the topic page.
I went to the page-templates folder, edit the wt_topic.html file.

I saw that:

Code: Select all

 <div id="wh_topic_body" class="col-lg-7 col-md-9 col-sm-9 col-xs-12">
                        <whc:webhelp_topic_content class="body"/>
The topic body is rendered from the "whc:webhelp_topic_content", is there any way that I can edit the "whc:webhelp_topic_content"?

Re: customize webhelp topic page

Posted: Thu Nov 21, 2019 10:52 am
by Costin
Hello,

More specific, what do you need to achieve?
Please provide more details on what you mean by "I want to customize the topic page."

Regards,
Costin

Re: customize webhelp topic page

Posted: Thu Nov 21, 2019 1:45 pm
by catherine
Hi, I want to change the layout of the topic_content_body.
I will add some div elements in the topic_content_body to contain my desired contents inside the topic page.

Re: customize webhelp topic page

Posted: Fri Nov 22, 2019 5:31 pm
by radu_pisoi
Hi,

To change the content generated for the Topic Content component you need to use the com.oxygenxml.webhelp.xsl.dita2webhelp XSLT extension point.

This extension point allows you to override the XSLT stylesheet (dita2webhelp.xsl) that produces an HTML file for each DITA topic. The location of this file is:

Code: Select all

{$DITA-OT-DIR}\plugins\com.oxygenxml.webhelp.responsive\xsl\dita2webhelp\dita2webhelp.xsl
The XSLT template that processes the webhelp_topic_content component can be found in:

Code: Select all

{$DITA-OT-DIR}/plugins/com.oxygenxml.webhelp.responsive/xsl/template/topicComponentsExpander.xsl
search for the XSLT template:

Code: Select all

<xsl:template match="whc:webhelp_topic_content" mode="copy_template">

Re: customize webhelp topic page

Posted: Wed Dec 18, 2019 9:46 am
by catherine
Hi, Radu
Thanks very much for your help!
:D :D :D