Attach a URL to a DITA Map - Fluid Topics - 3.7

Manage Map Attachments in Fluid Topics

Product
Fluid Topics
FT_Version
3.7
Category
Technical Notes

To add a URL as a map attachment to an instance of a DITA map, add the following lines to the FluidTopicsControlFile.xml file.

It is necessary to create one instance element for each DITAVAL variant:
- It is possible to provide more instances, and declare the map attachment only once for all of them.
OR
- It is possible to provide the instance only once, and then declare all attachments.
See the following section for use examples.

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<filePath>my_map.ditamap</filePath>
<instances>
<instance>
<filePath>version1.ditaval</filePath>
<attachments>
<attachment>
<displayName>My link</displayName>
<originUrl>$URL_TO_ATTACH</originUrl>
<mimeType>$MIMETYPE_OF_THE_URL_TARGET</mimeType>
</attachment>
</attachments>
</instance>
</instances>
</resource>
</resources>
</controlFile>

Where:

  • resource
    • filePath expects the absolute path to the DITA map file in the archive used to upload the DITA map to Fluid Topics. It can be retrieved from the Metadata Journal, in the dita:mapPath field.
  • instance
    • filePath expects the absolute path to the DITAVAL file in the archive used to upload the DITA map to Fluid Topics. It can be retrieved from the Metadata Journal, in the dita:ditavalPath field.
  • attachment
    • displayName is the title of the file to attach. It is displayed in the Downloads tab and can be clicked for a direct access to the attachment. In the case of reusing an existing map attachment, if the displayName does not match the initial one, then it overrides it.
    • originUrl is the URL to attach to the DITA map.
    • mimeType is the MIME type corresponding to the target content of the URL. It is used to display the type icon of the attachment.

Indicating an originId for the map attachment is recommended.

Example

To attach the Pufferfish are Famous online article to the Novice instance of the Pufferfish DITA map:

<?xml version='1.0' encoding='utf-8'?>
<controlFile>
<resources>
<resource>
<filePath>_pufferfish.ditamap</filePath>
<instances>
<instance>
<filePath>Novice.ditaval</filePath>
<attachments>
<attachment>
<displayName>Pufferfish are Famous</displayName>
<originUrl>https://www.nationalgeographic.com/animals/fish/group/pufferfish/</originUrl>
<mimeType>text/html</mimeType>
</attachment>
</attachments>
</instance>
</instances>
</resource>
</resources>
</controlFile>

Once published to Fluid Topics, the Pufferfish are Famous external link is now available in the Attachments tab of the Novice instance of the Pufferfish DITA map:

The URL is added to the map attachments