Add Prev Next links with titles

pault
Posts: 62

Add Prev Next links with titles

Tue Sep 20, 2016 11:31 pm

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: 318
Location: Craiova

Re: Add Prev Next links with titles

Wed Sep 21, 2016 4:06 pm

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: 62

Re: Add Prev Next links with titles

Mon Sep 26, 2016 8:46 pm

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

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 4 guests