Linking from one content item to another

It is likely that you want to link your content item to another item, therefore Prepr offers various options. You can enrich your content in Prepr by adding assets, social embeds, and custom elements.This feature is often used to refer to topics, authors or as a "read more" functionality. 

In this article

Internal links with a content reference

The content reference is a super-fast way to link related items to your content item. The content reference field is often used for linked content items, such as 'authors', 'categories', or as manually picked related items.

Display examples

There are three options to display the content reference field, depending on your needs. Those three options can be chosen in the content model: select a way to show a content reference field as a pop-up, as an autosuggest, or as checkboxes/radio buttons. All three display options have their own character:

Pop up

This function can be used if you want to search for specific content items. In the pop-up, you can search for content items, filter by assignee or model, and scroll through all search results.

Autosuggest

You can use autosuggest if you need a specific content item quickly, without having to search extensively. Start typing in your input field and the results will appear immediately.

Checkboxes

This option is best used if you only have a limited set of content items to choose from. An example is a topic or author you want to refer to. When you have indicated a maximum of 1 in your model, the options will be shown as a radio button. 

Note: The first 50 items are shown in the checkboxes view. Choose another appearance in the model settings to display all items.

View and content item from a content reference

Another trick is the click-through to the content item. From the pop-up, as well as from the autosuggest, or from the checkbox options you can easily click through to the content item you want to link.

When you hover over the title of the content item, an eye icon appears. Click on it to go to this content item. Changes you make in the title or the status of this content item will be updated in the source content item automatically.

Dynamic internal links

Internal links are references to items or assets in Prepr. You can refer to other content items in a text editor with the link option in the editor.

To create an internal reference, select the text you want to link. Click ' Insert item link' and choose whether you want to link to a content item or to an asset. Select the item or asset in the media browser and insert the link.
The created link is dynamic, this means that as soon as the title, slug, or URL of the linked content item or asset changes, the link will update dynamically. This way you never have to deal with dead links in your text again.

External linking options

Linking to an external URL can be done in two ways: with the link option in the editor or with a resource element.

Link option

To add an external link in the HTML editor, you need to enable the 'Link' option in your content model. 
Click ' Insert link' to make an in-line reference. Enter the URL, the link text, and decide whether this link needs to be opened in a new tab or not. For SEO purposes, you can also select the 'Don't follow' option. The links in the editor are an indigo color for recognition purposes. 
To adjust the link option, simply hover on the link and click ' Edit' to make changes in the URL or in the link text.

Resource element 

For external references, you can also use the resource element in a dynamic content field. To add a resource element in the HTML editor, make sure you enable the 'Resource' option in your content model. In the dynamic content field, a resource element has three input fields and options:

  • URL input: As soon as you add the URL to the resource element, a preview is loaded.
  • Label: The label is automatically filled in based on the title. This label can be overwritten manually.
  • Type: Every resource field has a type, with which (for example) the display on your frontend can be determined. By default, the type 'Webpage' is shown. You can change this to video, audio, document, or other.