Add Prev Next links with titles

Post here questions and problems related to editing and publishing DITA content.
pault
Posts: 70
Joined: Thu Mar 21, 2013 12:55 am

Add Prev Next links with titles

Post by pault »

Hi,

I am using Webhelp Responsive and have implemented the Prev/Next arrows on every topic page in both the breadcrumb area and at the bottom of the page. However for the bottom of the page, I'd like to use the actual topic titles instead of arrows. This seems like it should be easy, but I can't figure out how to do it. What do I need to do on the wt_topic template page and anywhere else to make this happen?

Thanks in advance,

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

Re: Add Prev Next links with titles

Post by radu_pisoi »

Hi,
pault wrote: However for the bottom of the page, I'd like to use the actual topic titles instead of arrows.
To apply different styling/processing depending where the navigation links are displayed you can specify a certain class when you duplicate the Webhelp component. You will find this class in the Webhelp output.

Code: Select all

<whc:webhelp_navigation_links class="bottom_navigation_links"/>
Now, to display the topic title you can use this specific class (bottom_navigation_links) and the a/@title attribute( it contains the topic title). Next, you need a custom JS to copy this information.

Please note that the tooltip text displayed when you hover the navigation links prefers the topic's short description. Thus, if a topic has a short description then it will be used for hover text, otherwise the title of the topic.

This tooltip text is computed from XSLT, so if you don't want to display the topic's short description you need to modify the XSLT stylesheets too. You need to modify the next stylesheet: DITA-OT2.x/plugins/com.oxygenxml.webhelp/xsl/dita/rel-links.xsl

Comment the next template call:

Code: Select all

<xsl:apply-templates select="." mode="add-desc-as-hoverhelp"/>
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
pault
Posts: 70
Joined: Thu Mar 21, 2013 12:55 am

Re: Add Prev Next links with titles

Post by pault »

Thanks Radu, we implemented this quite easily with your advice!
Post Reply