Page 1 of 1

DITA Webhelp doesn't follow map hierarchy

Posted: Tue Mar 06, 2018 1:44 am
by mdslup
I have a very simple map set up:

Master Map
-- Submap 1
----Topic 1
----Topic 2
--Submap 2
----Topic 3
----Topic 4

When I generate the webhelp, the resulting index file ignores the fact that there are 2 submaps. Instead, it looks like this:

index.html
Topic 1 (link)
Topic 2 (link)
Topic 3 (link)
Topic 4 (link)

How can I make the output so that it looks like this:

index.html
Submap1
Topic 1 (link)
Topic 2 (link)
Submap2
Topic 3 (link)
Topic 4 (link)

Thanks.

Re: DITA Webhelp doesn't follow map hierarchy

Posted: Tue Mar 06, 2018 12:44 pm
by Costin
Hi mdslup,

Please note that the <mapref> element acts only as a container for the content coming from other DITA Map, merging the hierarchy of the referred DITA Map to the one from the container map. This is explained better HERE in the DITA specification.

As it is considered only a container by the DITA transformation, the mapref element itself is not present in the output, only the topics hierarchy it refers is present. So the behavior you report is intended.
In case you also need the referred map to appear in the output, an idea would be to use a <topichead> with a navtitle attribute set on it and include the DITA Map through a child <mapref> element.
You can see an example of this in the same page that I mentioned above (see "Figure: Map that reuses lib.ditamap").

Regards,
Costin

Re: DITA Webhelp doesn't follow map hierarchy

Posted: Tue Mar 06, 2018 9:50 pm
by mdslup
Understood, thanks.