Page 1 of 1

Webhelp responsive: Adding text links to the navprev/navnext arrows

Posted: Mon Jul 27, 2020 12:50 pm
by ckabstein
Hi,

We would like to make some layout changes to the navprev/navnext arrow icons in the webhelp template.

We have managed to remove them from the top right area, where they appear on the same line as the breadcrumb, and move them to the bottom of the pages.

However, at the bottom, we would like to show the topic title next to the arrows, not just the arrows.

In the dita2xhtml.xsl file, I have seen that in the

Code: Select all

<xsl:template match="/|node()|@*" mode="gen-user-header">
template, the following code seems to create the links behind the arrows:

Code: Select all

 <xsl:call-template name="makelink">
                <xsl:with-param name="label" select="$textLinkBefore"/>
              </xsl:call-template>
I have checked the topicComponentsExpander.xsl file where it says:

Code: Select all

<xsl:template
        match="span[@id = 'topic_navigation_links']/span[contains(@class, 'navprev')]/a/node()"
        mode="copyNavigationLinks">
    </xsl:template>
    <xsl:template
        match="span[@id = 'topic_navigation_links']/span[contains(@class, 'navnext')]/a/node()"
        mode="copyNavigationLinks"/>
When I change node() to text() in the topicComponentsExpander.xsl file, the makelink template returns the node as text, but it adds the "navheader_label" and "navheader_separator" strings to the topic titles, which we don't want to see. We just want the topic title to appear.
I cannot remove those strings, because that would break the aria-label code for accessibility purposes.

Is there a way to only show the topic titles next to the arrows?

Thanks,
Christina

Re: Webhelp responsive: Adding text links to the navprev/navnext arrows

Posted: Mon Aug 03, 2020 10:44 am
by ckabstein
Just for your info: we have now moved to DITA OT 3.4.1 and Oxygen 22.1, but I presume that it will not make a difference re. my question.

Hope you can help.

Thanks,
Christina