Working with conrefs

You can create a conref in a DITA topic or map using the DITA conref dialog.

This section covers the following topics:

Create a conref

Creating a conref to a range of elements

Updating conrefs

Create a conref

To create a conref to a DITA topic or map in your current topic or map, you first need to Set up refer­ence content in the target topics or maps

Next, you create a direct or indirect reference to the target DITA content.

1)Place the insertion point at the location to insert the conref in a topic or map.

To insert a conref at a location in the topic, you need to place the insertion point relevant to the conref element:

An li (list) conref element must be placed in an ol or ul list.

A table row must be placed in a table or simpletable.

In the case of a table entry, you cannot place the insertion point in the table row; you need to select the existing entry that you want to replace.

2)From the DITA menu, choose Insert Conref.

The DITA conref dialog is displayed.

3)You can choose to add a link as a direct or indirect reference to the target content. For details, see DITA referencing.

To create a direct reference to the target content:

a)Check Refer to file.

b)In the drop-down list, choose from the available DITA topics that contain conref elements.

If the topic is not available in the list, browse for the topic.

note:    To open the selected topic in the drop-down list, click Edit.

c)After you select the DITA topic, the Element Tag list displays the elements to which unique identifiers are assigned.

The elements in the DITA topic of the selected element tag that are assigned a unique identifier are displayed in the Element Data list. If an element is not assigned a unique ID, you can Assign a unique ID to an element or check Show All to display all elements of the element type.

d)Select an element to insert as a conref in the current topic.

The elements in the DITA topic of the selected element type that are assigned a unique identifier are displayed in the Element Data list.

The list also displays the ID and the contents (in the case of text elements) of the elements.

If you make changes to a conref element in the source topic, you will need to save the source topic and update the container topic to view the updates.

To create an indirect reference to the target content:

a)Check Refer to key and click Edit.

b)In the Key References dialog, select the required key from the Key drop-down list.

For details on how to add key references, see Using keyspaces to manage DITA key refer­ences.

After you select the key, the Element Tags list displays the DITA topic types included in the keyspace. You can read more on how to Create a keyspace.

c)Select an element tag.

The elements in the DITA topic of the selected element type that are assigned a unique identifier are displayed in the Element Data list. If an element is not assigned a unique ID, you can Assign a unique ID to an element or check Show All to display all elements of the element type.

d)Select an element to insert as a conref and click OK.

4)Click Insert.

Creating a conref to a range of elements

You can create a conref to a range of elements. For example, say you have number of p (paragraphs) elements that you want to conref in a range. You can create one conref to all the p elements.

note:    To specify a range for the content reference, the elements within the range must be of the same type. At least the start and end elements must have unique identifiers.

1)To select the first element in the range perform steps in the section Create a conref but do not click Insert.

2)In the Conref End Element drop-down list, choose the last element in the range to include in the conref.

3)Click Insert.

Updating conrefs

If you update a reusable element after you reference it in another topic, you need to update the conrefs in the topic to view the updates.

To update the conrefs in a topic:

1)From the DITA menu, choose Update References.

The DITA Update References dialog is displayed.

2)Check Update All Conrefs in File.

3)Click OK.

All the conrefs in the current topic are updated.


September 30, 2016

Legal Notices | Online Privacy Policy