customize webhelp topic page

catherine
Posts: 119
Joined: Fri Nov 10, 2017 8:16 am

customize webhelp topic page

Post by catherine » Wed Nov 20, 2019 11:26 am

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"?

Costin
Posts: 677
Joined: Mon Dec 05, 2011 6:04 pm

Re: customize webhelp topic page

Post by Costin » Thu Nov 21, 2019 10:52 am

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
Costin Sandoi
oXygen XML Editor and Author Support

catherine
Posts: 119
Joined: Fri Nov 10, 2017 8:16 am

Re: customize webhelp topic page

Post by catherine » Thu Nov 21, 2019 1:45 pm

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.

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

Re: customize webhelp topic page

Post by radu_pisoi » Fri Nov 22, 2019 5:31 pm

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">
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

catherine
Posts: 119
Joined: Fri Nov 10, 2017 8:16 am

Re: customize webhelp topic page

Post by catherine » Wed Dec 18, 2019 9:46 am

Hi, Radu
Thanks very much for your help!
:D :D :D

Post Reply