cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

ditamap in a ditamap?

bfriesen
18-Opal

ditamap in a ditamap?

If I have 4 specific topics that can be reused in every ditamap that I created. What do I need to do to group them together? I tried placing them in a ditamap then including that ditamap in the original ditamap, but it did not give me the results that I wanted.

thanks

Bryon

ACCEPTED SOLUTION

Accepted Solutions

That would be your (simplified) "torque.ditamap":

<map>

<topicgroup>

<topicref href="topic1.dita" navtitle="Topic 1" />

<topicref href="topic2.dita" navtitle="Topic 2" />

<topicref href="topic3.dita" navtitle="Topic 3" />

<topicref href="topic4.dita" navtitle="Topic 4" />

</topicgroup>

</map>

Your actual main ditamap would just have the following where you want to have your torque topics:

...

<topicref href="torque.ditamap" navtitle="not relevant here" />

...

So that basically would "include" your torque map wherever you need it.

Regards

Sirko

View solution in original post

7 REPLIES 7

Just thinking out loud here but topics can contain topics - did you try that yet?

Bryon - what is your desired result? Are you trying to make these 4 into 1 Topic?

Is the intention then to reuse the new 1 Topic instead of pulling in 4 separate ones?

What I am after is we have a specifications section in our manuals and there are 4 topics referencing differnt torque specs. I want to make it easier for or writers to add this complete section to any manual. So I thought why not a ditamap. I could add the four topics to it then add it to the ditamap. The torque section would be there in a certain order, this would then be consistant through out all the manuals that this section is required. Gareth, can you elaberate on your suggestion. Are you meaning to create one topic and reference all the content into it?

Bryon

Bryon,

you should have a look at the topicgroup, topichead and topicset elements in the DITA spec. Depending on the desired structure you might either want to use topichead, which would include a section title for your "grouped" topics or topicset, which provides a unique ID (for re-use) for your group of topics but doesn't add another level in the TOC. Instead of topicset you could also use topicgroup which is suitable when the topics within that element can be re-used in different contexts (meaning there could be different topics before or after on the same TOC level). But I guess what you are after is the topichead which would provide you the possibility to set a section title for you group of topics.

You then insert the map containing one of the wrapping elements and the topicref's to your 4 topics using a plain topicref element.

I hope that is the kind of information you have been looking for.

Kind regards

Sirko

Sirko's idea is a good one - you could setup the topic grouping in some sort of template ditamap that you use for all new manuals of that type.

My suggestion was a bit more rudimentary:

<topic>

<title>My Torque Group</title>

<body><p>Something if needed here.</p></body>

<topic>

<title>Torque Topic 1</title>

<body><p>blah blah.</p></body>

</topic>

<topic>

<title>Torque Topic 2</title>

<body><p>etc.</p></body>

</topic>


</topic>

If I would use a topicgroup, this would still only be contained in a "torque" ditamap. I would need to copy and paste this topicgroup with the 4 topics to all the different manuals that I would want it to show up in, instead of adding one "torque" ditamap to my ditamap that I am working on?

Thanks

Bryon

That would be your (simplified) "torque.ditamap":

<map>

<topicgroup>

<topicref href="topic1.dita" navtitle="Topic 1" />

<topicref href="topic2.dita" navtitle="Topic 2" />

<topicref href="topic3.dita" navtitle="Topic 3" />

<topicref href="topic4.dita" navtitle="Topic 4" />

</topicgroup>

</map>

Your actual main ditamap would just have the following where you want to have your torque topics:

...

<topicref href="torque.ditamap" navtitle="not relevant here" />

...

So that basically would "include" your torque map wherever you need it.

Regards

Sirko

Announcements

Top Tags