Page 1 of 1

DITAMAPs- getting unique search results while more than one

Posted: Thu Mar 13, 2014 4:26 pm
by JeffR
Hi Folks,
I'm scratching my head. If I want to use a topic more than once in a map, what are the best practices making it unique in the output file, in this case webhelp?

The behaviour I want:
Let's say I have a common task topic called "Close the Window". I want to use the topic in two unique instances, say "Close the Kitchen Window" and "Close the Bedroom Window" because the windows work the same. If a reader searches for "Close", I want search to return the two topics "Close the Kitchen Window" and "Close the Bedroom Window". Clicking a link in the search results should send them to the correct location in the map.

I can't do it using topic content- anything IN the topic isn't unique.

Setting the navtitle attribute for each topicref element isn't working either.

Ideas? Thanks in advance...

Re: DITAMAPs- getting unique search results while more than

Posted: Thu Mar 13, 2014 6:02 pm
by Radu
Hi Jeff,

I see two possibilities here:

1) Using the DITA copy-to attribute on the references to the unique topic (the first reference to it could be without the copy-to attribute and the subsequent ones could have it set each time to a different file name):

http://docs.oasis-open.org/dita/v1.2/os ... l#topicref

Something like:

Code: Select all


........
<topicref href="path/to/original.dita" copy-to="path/to/original-copy.dita"/>
..............
2) You create two topics on disk, the first one would have the actual content:

Code: Select all

<topic id="topicID">
<title>Introduction</title>
<body>
<p>Welcome to Syncro mobile phone user guide.</p>
<p>This user guide is focused on describing features and functionality of your mobile phone.</p>
</body>
</topic>
and the second topic would make a conref to the first one:

Code: Select all


<topic id="topic2" conref="firstTopic.dita#topicID">
<title></title>
</topic>
So you would have the content in only one topic but have a topic on disk for each of your references.

Regards,
Radu