Block Links
Relationship Table Links
Relationship tables enable you to link related topics in a map.
Default Relationship Table Overview
You begin a relationship table by adding a reltable element to a map. To enable linking between the particular topics in a map, you insert the topicref elements into the appropriate relationship table cells. easyDITA enables you to perform these actions by using an intuitive graphical interface.
The following example shows that the reltable element links the “Concept A”, “Task A”, “Reference A”, “Reference B”, and “Reference C” topics together in the “Map A”. The topics are not linked outside the map.
The default relationship table layout includes three columns that correspond to the following topic types:
- concept topic
- task topic
- reference topic
By default, relationship tables handle linking in the following way:
- Topics in a given table row link to each other
- Topics in the same table cell don't link to each other
In the following example “Concept A” links to “Task A”, “Reference A”, “Reference B”, and “Reference C” because these topics are in the same table row. The reference topics link to “Concept A” and “Task A” but don't link to each other because they are in the same relationship table cell.
The following PDF output examples illustrate the default linking settings of a relationship table.
Customized Relationship Table Overview
Relationship tables are highly customizable. The following attributes enable you to adjust the most useful linking settings in your relationship tables.
- collection-type attribute
- Assigning the family value to the collection-type attribute of the relcell element enables linking between topics inserted in the same relationship table cell.
In the following example, the cell that contains the concept topics is configured to enable cell linking.
The following PDF output example illustrates linking between “Reference A”, “Reference B”, and “Reference C” inserted in the same relationship table cell.
- linking attribute
-
Assigning the sourceonly value to the linking attribute of the topicref element modifies the topic linking in the following way:
-
Prevents other topics from linking to the topic
-
Allows the topic to link to other topics
Assigning the targetonly value to the linking attribute of the topicref element modifies the topic linking in the following way:
-
Allows other topics to link to the topic
-
Prevents the topic from linking to other topics
-
In the following example, “Concept A” links to other topics in the same relationship table row but other topics don't link to “Concept A”.
The following PDF output examples illustrate “Concept A” with linking attribute set to targetonly value.
In the following example, “Task A” doesn't link to other topics in the same relationship table row but other topics link to “Task A”.
The following PDF output example illustrates “Concept A” that links to “Task A” with linking attribute set to the targetonly value. “Task A” does not link to other topics in the same relationship table row.
Use Cases
Consider using relationship tables if you want to reuse topics in multiple maps or reduce the number of dependencies between topics.
- The following topics are linked together in the “Classic Toaster User Guide” map: “Safety Warnings”, “Cleaning the Toaster”, and “Specifications”.
- The links are placed at the end of each linked topic in the “Related
topic_type” section.
Where, topic_type is the type of a DITA topic that you link to.
Maintenance Considerations
Keep the following considerations in mind when working with relationship tables:
- Relationship tables require little maintenance because every link is in the reltable map element.
- easyDITA includes an editor that enables you to easily manage linking in relationship tables by dragging and dropping topics into the appropriate table columns.
- Relationship tables do not limit topic reuse because you link topics on a map level.
-
You can add multiple relationship tables to a map. It is useful if you plan to maintain a large number of relationship table links.
Publishing Considerations
Keep the following considerations in mind when publishing maps with relationship tables:
- Relationship table links are published at the end of a topic in the “Related Links” section.
- If you publish to a print-friendly output (for example, PDF), links may reference a page number.
- Relationship table links resolve at publish by populating the link text with topic titles.
Insert a Relationship Table
Inserting a reltable element into your map enables you to create links between topics without the need to edit the individual topics.
Link Topics in a Relationship Table
You create links by dragging and dropping the topics from the map editor to the appropriate relationship table cells.
-
Topics in the same relationship table row link to each other
-
Topics in the same relationship table cell don't link to each other
Customize Linking in a Relationship Table
You can customize your relationship table linking settings by modifying specific attributes.
- If you want to enable linking between topics in the same cell, do the
following:
- If you want to prevent a topic from linking to other topics, do the
following:
- If you want to prevent other topics from linking to the topic, do the
following:
Related Links
The related-links element enables you to quickly add links to related information at the end of a topic.
Overview
By default the related-links element inserts at the end of the topic.
- “link A” links to “Topic B” in the content library.
- “link B” links to a non-DITA document in the content library.
- “link C” links to a website.
- “link D” links to a document hosted on an external
server.Important: Always ensure that the files that you link to are not malevolent. Be extra cautious when linking to executables like EXE or APP files.
Use Cases
Consider using the related-links element in the following situations:
- When you want to link to DITA or non-DITA files in the content library that are not included in the map.Tip: When you want to link to a DITA file that is in the same map, we recommend using the Relationship Table Links because they do not limit topic reuse.
- When you want to link to external resources like websites or documents on external servers.
- “Reference A” links to a DITA topic in the content library.
- “Sample_Word_Document.docx” links to a Microsoft Word document in the content library. When you click it, the file downloads.
- “DITA Open Toolkit Homepage” links to https://dita-ot.org/. The link has custom link text, and a description that is visible as a tooltip when you hover over the link.
Maintenance Guidelines
The related-links element require a moderate level of maintenance because they may limit topic reuse. If you do not want to limit topic reuse, consider using Relationship Table Links or Map Links.
Keep the following guidelines in mind when using related-links elements.- If you link to a DITA topic, the title element of the topic is used as the link text. To reduce maintenance, we do not recommend entering custom link text.
- Do not link to DITA maps as this may cause unexpected results in some outputs.
- If you link to a non-DITA resource in the content library, the file name is used as the link text. If needed, enter custom generic link text.
- easyDITA prevents you from removing resources that are linked in other topics. When you attempt to move a resource to Trash, a warning appears. You need to remove the references to the resource before moving it to Trash.
- If you link to external resources, for example websites, you must add a link text manually. Remember to make it generic to avoid maintenance issues.
Publishing Guidelines
Keep the following guidelines in mind when publishing content with related-links elements:
- Because the related-links element gathers links
in one element at the end of a topic you can easily apply conditional
profiling to this element or links inside it so that links are
included, for example, only in online outputs.
For more information, see Conditional Processing Strategies.
- We do not recommend linking to elements in other topics because some publishing engines or publishing scenarios may produce unexpected results in the output.
- If you publish to a print-friendly output (for example, PDF), links may reference a page number.
- The related links are usually displayed at the end of the topic. Some web-like outputs (for example, webhelps) may display them in a separate navigation pane.
- If you publish to a print-friendly output (for example, PDF), ensure that the topic that you link to is included in the same map as the topic that you link from.
- If you publish to a web output (for example, webhelps, or Jorsek Portal), you can link to topics not included in the same map as the topic that you link from.
Insert Related Links
The related-links element inserts at the end of a topic.
- “Reference A” links to a DITA topic in the content library.
- “Sample_Word_Document.docx” links to a Microsoft Word document in the content library. When you click it, the file downloads.
- “DITA Open Toolkit Homepage” links to https://dita-ot.org/. The link has custom link text, and a description that is visible as a tooltip when you hover over the link.
Map Links
Overview
You create map links by using the appropriate map structure and the collection-type attribute.
The collection-type attribute can take the following values:
- sequence value
- Generates an ordered list of links from parent to children. The order of links is the same as the order of topics in the map.
- unordered value
- Generates an unordered list of links from parent to children. The order of links is the same as the order of topics in the map.
- family value
- Generates an unordered list of links from parent to children and from sibling to sibling. The order of links is the same as the order of topics in the map.
- choice value
- Uncommon and typically used in custom outputs that enable the user to select one child topic to continue. In most cases, it is rendered in the same way as the unordered value.
- The “Task B” is a process topic with the collection-type attribute set to the sequence value.
- “Task B” will link to “Task C”. “Task D”, and “Task E” in the output.
- The linked topics will not link to each other outside the map.
Use Cases
Consider using map links in the following situations:
- When you want to create a process topic based on map links
Figure 22. Process Map Structure. The following example shows that:- There are three procedures appended under the “Process A” topic.
- The “Process A” topic has the collection type attribute assigned
Figure 23. Rendered Process Topic. The following PDF example shows a sample process of the structure visible in Process Map Structure.
- When you want to enhance navigation between certain sections in a web format like webhelp
Maintenance Considerations
Keep the following considerations in mind when working with map links:
- Map links do not limit topic reuse because you link topics on a map level.
- Map links are based on map structure. If you change the map structure, they links will be updated.
Publishing Considerations
Keep the following considerations in mind when publishing map links:
- Map links resolve at publish and link text is populated with the topic titles.
- If you publish to a print-friendly output (for example, PDF), links may reference a page number.
- You must use the DITA Open Toolkit and set the args.rellinks parameter to all.
Configure Map Linking
You configure map linking by assigning the appropriate collection-type attribute values.
- In the content library, hover over a map and click the Open button.
- Set the collection-type attribute of the parent topic by doing the following:
- The “Process A” topic is a parent of the “Procedure A”, “Procedure B”, and “Procedure C” topics.
- The “Process A” topic has the collection-type attribute set to the sequence value.