Multiple levels of menu in Webhelp Responsive Tree

Posts: 148
Joined: Tue Mar 06, 2018 1:34 am

Multiple levels of menu in Webhelp Responsive Tree

Post by mdslup » Fri Feb 14, 2020 4:33 am

In the Webhelp responsive tree layout, the arrows that you use to expand the menus on the main page only go 1-level deep.

Is it possible for these arrows to have a deeper level, so that I can expand multiple levels of menu while I'm still on the main page?

Site Admin
Posts: 176
Joined: Thu Dec 24, 2009 11:21 am

Re: Multiple levels of menu in Webhelp Responsive Tree

Post by alin » Fri Feb 14, 2020 12:57 pm


Here is a quick solution for the content structure generation part:
You can use an XSLT extension file inside your current Publishing Template to override the default structure of the TOC component from the main page.

The XSLT extension file should contain:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
    <xsl:template match="toc:topic" mode="create-main-page-toc">
        <xsl:param name="applyRecursion" select="true()"/>
            <xsl:with-param name="applyRecursion" select="true()"/>    
Afterwards, you can link your extension file in your Publishing Template's descriptor file within the <xslt> section as follows:

Code: Select all

            <extension file="xsl/tree-recursive.xsl" id="com.oxygenxml.webhelp.xsl.createMainPage"/>
The snippet above assumes the fact that the file is called tree-recursive.xsl and is located in the xsl subdirectory of your Publishing Template's root directory or archive.
You can read more about XSLT Extension Points in our User Manual: ... mport.html

Note: The XSLT Extension only solves the content structure generation part of the your problem. There are some expand/collapse issues that you need to resolve using some custom JS.

Alin Balasa
Software Developer
<oXygen/> XML Editor

Post Reply