Manually Create a Fork Link
If an element is reused several times in a publication and you want to link to the element in a specific topic to provide context to the reader, you have to manually create a fork link
for your PDF output.
You can add cross-references to About Elements (images, paras, procedures, tables) reused in components or topics, but it will point to where the element was initially created, see Cross-References and Links.
When a topic or component is included in a publication, it gets a unique fork:id
for that specific instance in the publication. By adding the element xml:id
to the fork:id
, you get a fork
link
that leads to the element in the reused position. The fork link will by default show the page number within square brackets for PDF output. To style the cross-reference, see Cross-Reference Settings.
Note
A manually created fork link
only works in the publication it originates from.
To manually create a fork link:
-
Generate an
xml:id
for the target element, see Manually Generate IDs for Cross-references. -
Open the topic that will have the cross-reference.
-
Select Link and choose Cross-reference in the toolbar.
-
Enter a Link label. (Optional).
-
Navigate to the publication.
Note
The cross reference dialog shows the targets both as part of the publication and as topic (outside the publication tree). It is important to select the one in the publication tree to get the
fork link
!Learn the difference between topics and forks, see Topic or Fork.
-
Select the arrow in front of the topic to see linkable elements.
-
Select the element to make it appear as a link in the topic. It will lead directly to the element origin.
-
Copy the element
xml:id
(from the front slash "/" and forward) from the created link. -
Redirect the cross-reference to point to the topic containing the reused component.
In our example it is "Battery disposal".
Note
The cross reference dialog shows the targets both as part of the publication and as topic (outside the publication tree). It is important to select the one in the publication tree to get the
fork link
!Learn the difference between topics and forks, see Topic or Fork.
-
Paste the element
xml:id
after the topicfork:id
in the Element Attributes Panel.In our example, the Battery disposal
fork:id
is "urn:resource:fork:37742". -
Select Save.
-
Publish the topic as PDF to test the link.
The preview is not able to visualize
fork links
.