How do you nest ditamaps so that the html treats them as expandable sections?
I have Ditamap1 that contains Ditamap2 and Ditamap3
Each map has a <title>Name of map</title> element
Ditamap2 contains topic1, topic2, topic3
Ditamap3 contains topic4, topic5, topic6
Currently, when I output to html5 or pdf I get a flat file:
What I'd like is:
When nesting maps, the map itself should impose no hierarchy. Basically all maps are merged into one big map and the map elements disappear. So, if what's inside of your maps is flat (all siblings), that's what you'll get when you publish. If you want the published topics to have a hierarchy (collapsing implies some type of hierarchy), you'll likely need someplace (a topic) for them to collapse into .. but fundamentally, that's up to the tool you're using to produce the HTML, which could be set up to do most anything you want.
To do what you're suggesting, I'd expect that the submaps would look something like this ..
You'll see that this adds a new "root" topic to each of the submaps. This gives someplace for the topics to collapse into. In general all submaps should have one root topicref. This isn't an absolute requirement, but will generally be closer to what you're expecting to get when you nest maps.
Hope that helps!
Many thanks for your quick response.
Sent from my iPad
The tool I'm using to generate the html is FM > Publish to Responsive HTML5.
Publishing a ditmap that only contains topics arranged into a hierarchy, for example:
Topic1 (placeholder topic as suggested)
Title (set inside the Publish settings .sts file) in the banner
Which is what I'd expect.
Putting Ditamap2 and a similar Ditamap3 inside Ditamap1:
So, putting a ditmap inside another removes the hierarchy completely.
That's unfortunate. Sounds like the Publish command isn't working properly. It should treat the content the same, whether it's in one map or multiple maps. Is this with FM2017?
It's possible that there's some setting ("HonorNestedMaps"??), but I'm not very familiar with the way that works. Perhaps someone else will be able to provide more useful info.
If this doesn't do what you want, you might consider using the DITA-OT. It may or may not do what you want out of the box, but if not, you can customize it to do exactly what's needed.