Xref dialog

Key point: Insert or edit an xref when editing a PSML document.

Typically, an xref is a two-way link between a source and target document. The options for xrefs depend on the media type of the source and target, and the xref configuration. For PSML documents, the target destination can either be the whole document or a fragment.

The xref dialog lets you add or edit xrefs when editing a document.

It displays three possible views:

  • Search – when adding an xref or changing the target document.
  • Browse – when adding an xref or changing the target document.
  • Edit – To modify attributes once target document is defined or when editing an existing xref.

The Search view is the default when creating an xref.

The Edit view is the default when editing an existing xref. 

Use the keyboard shortcut Control+K (or Command+K on MacOS) to open an xref dialog and insert an xref while editing a fragment.

Xref configuration

The Configuration field drop-down lets you select the xref configuration for your xref. It defaults to the Default configuration which lets you select any target document anywhere and doesn’t restrict the values of any of the xref attributes.

Other xref configurations might be defined by a developer. The xref configuration can constrain both the target document and the attributes for the xref.

The target document might be constrained by document type, folder or group. These constraints affect the search and browse views. Specific search queries can also be predefined to help you find the correct target document.

If the xref configuration constrains any of the xref attributes such as the labels, type, display, and level of the xref, these constraints affect the Edit view.

For developers: See the xref config article on the PageSeeder developer’s website to learn how to customise the xref configuration.

Setting the target

When the target document or fragment is not yet selected, you can choose between two methods to set the target of the xref. 

You can search for the target document or browse the folder structure to locate it. Then, you preview the document before you can set the target of the xref, which can be either the document or a fragment within that document.

You can swap between these two methods by clicking the icon or the icon.

The current group shows in the field at the right of the dialog. Change the group name to see a list of other available groups to search or browse. Click a group in the list to select it.

If you target a document in a different group, it might not be accessible to users unless it is shared or they are also members of that group.

Click the Edit xref button to return to edit screen.

Search

Searching is the default method to find your document, the dialog automatically opens to this view when creating an xref.

Search query

When the Search documents field is empty, the search view lists the most recently modified or created PSML documents in the group. Type the term in that field to list the auto-suggested results.

If you have selected some content in the editor, that text is used to initialize the value of this field and suggest documents that match the term.

The auto-suggested results are the documents that have words in their title, Document ID, filename, heading or prefixed paragraph that start with the term you entered. The search term is not case sensitive.

For example, if you type ‘acc’, it returns all the documents which match terms such as ‘access’ or 'account'.

This field also supports suggested filters for document types and labels.

For example, if you type ‘de’, it suggests that you filter your results with the document type ‘default’.

The xref configuration might specify different fields to search and different suggested filters.

If the term you’re looking for is only available in the content, click the checkbox to the right of the search box to suggest results doing a full-text search.

If you want to search documents in a different group, use the group field on the top right of the dialog.

Suggested results

The suggested results show the title and location of every matching document. If the document has a description, it is also shown. The last modified date is only displayed when no document is selected.

The matching term is highlighted. If you opted for the full-text search, the results include an extract of the content that includes the matching term.

The xref config might specify different fields that are displayed in the results.

Click a result to preview the document.

Browse

Use the browse view if you know where your target document is located or if you want to create a new document as the target.

This view shows the folder tree structure for the current group. If you want to browse the folders from a different group, use the group field on the top right of the dialog.

This view is initially set to the folder of the current document.

Use the icon to expand a folder and icon to collapse a folder. When you expand a folder, it lists the folders and documents within that folder.

If the xref configuration constrains the target document then you can not select documents in browse but you might be able to create them.

Click a document title to preview that document.

Create a new document

The form to create a new document is displayed by default. Select the location you want to create your document in by clicking a folder title in the folder tree structure. Select the Document type and enter the document title of the document to create. If you want to enter additional details, click the Show more details – refer to the create document dialog article for further information on how to fill out these fields.

Click the Create button to display the new document in the preview.

If you click the Cancel button at the bottom, the creation of the xref is abandoned, but the document you have already created is kept.

Document preview

Once you preview a document on the right side of the panel, you can select the target for the xref. If you don’t want to reference this document, click the icon to hide the document preview.

  • Click the Select this document button to reference the entire document.
  • Or, to select a specific fragment, scroll to the fragment you want to reference and click to select it.

When you select a document or the fragment, the dialog returns to the form to edit the attributes of the xref.

Add a fragment

You can add a fragment to the preview document.

Click the  Enable editing button at the top right of the preview document to enable limited editing of the document. Then, to insert your new fragment, click the  Insert fragment icon before or after an existing fragment.

Enter the content for your new fragment then click the Create button.

Once you click the Create button, the fragment has been created in the target document, regardless of whether you abandon creating the xref.

Click the new fragment to select it as the target; the dialog returns to the form to edit the attributes of the xref.

Editing xref

You cannot edit an unresolved xref, but you can use the Browse or Search button to set a new target.

Target document

When a target document or fragment is selected, you see the document title of the target document at the top middle. If you have selected a fragment, the fragment number in the target document shows to the right of the document title.

You can select a different target document or fragment using the Search or Browse method.

  • Click the   Search button to bring up the search view.
  • Or click the  Browse button and use browse view to navigate to a target document

Link preview

Under the document title, in the middle, you see a link preview. In your source document:

  • If you have highlighted text to use as the link title (not applicable to xrefs in regions) – you see that highlighted text here, the Link title field is set to Manual,  and the Manual field is filled with your highlighted text.
  • If you have not highlighted text to use as the link title – you see the document title of the target document, the Link title field is set to Document, and there is no visible Manual field.

The following fields are available for editing:

Link title

The choice in the Link title field is what you see in the source document.

In the Link title field, select an option from the drop-down:

  • Document – the default, the Document title of the target document.
  • Document + fragment – the Document title of the target document followed by a colon, then the fragment ID.
  • Document  + manual – the Document title of the target document followed by a colon, then manually entered text. If selected, a Manual field displays.
  • Manual – manually entered text. If selected, a Manual field displays.
  • Template – xref configurations which enable the link title to be composed from variable values, such as a paragraph number, filename or docid. Type one or more of the following values in the Title template field: {document}, {filename}, {docid}, {fragment}, {prefix}, {parentnumber}, or {heading}. Start typing one of these, then press to auto-complete it.

The {prefix}{parentnumber} and {heading} variables can be used with each other but are not in the same title with other tokens and can no be used with Link types Embed or Transclude.

Link type

In the Link type field, select from these types of links available in the drop-down:

  • None – the default.
  •  Alternate – Alternate version of the source document.
  • Embed – embed the linked content.
  • Transclusion – transclude the linked content.

Link level

In the Link level field, select an option from the drop-down:

  • No link level – the default.
  • Increase by 1 through 5 – with 1 being one level further down the heirarchy etc.

Reverse title

The reverse xref title is the name of the xref from the perspective of the target document. The Reverse title field is required if the xref is to be a two-way link. The name you enter in this field is seen in the source document, by clicking the icon in the left sidebar to open the document references panel. Any reverse titles are seen in the Incoming tab under each source document xref. 

Clear the checkbox if you don’t want the link to be a (two-way) reverse link.

Xref label

A label can be added to the xref by clicking an existing label or click the icon and type a name for the new label.

The xref configuration might define a different set of labels to select from or predefine the labels.

When the preceding fields are completed, click the Save button at the bottom of the edit xref dialog to create the xref.

How to find this page

For a PSML document, when in document view in edit mode:

  • Create xref – click the icon in the editing toolbar, or right-click and select Cross-reference in the editing context menu.
  • Edit xref – click in the fragment, then right-click on an existing xref, then click Cross-reference in the editing context menu.

Or when editing an xref fragment with the xref list editor:

  • Create xref – click Browse button.
  • Edit xref – click the icon on the line of the xref you want to edit.

Or for a PDF or image document:

  • Create xref on a region – click the icon in the document toolbar and select a region.