Insert a link in a text field
In Rich Text fields, you can create links to websites or email addresses by entering the URL or email address followed by a space or paragraph return. Sitecore automatically formats the text as a hyperlink.
This topic describes how to create the following types of links:
-
Internal links (links to Sitecore items), using the Insert Sitecore Link functionality.
-
Links to bookmarks on the current page, using the Hyperlink Manager.
-
Links to websites or email addresses from images, or from text strings that differ from the URL or email address, using the Hyperlink Manager.
-
Media items in the media library, using either the Sitecore Link functionality or the Hyperlink Manager.
When you use either the Insert Sitecore Link functionality or the Hyperlink Manager to create a link to a Sitecore item (such as a page or media item), the link refers to the item ID. This ensures that the link is maintained if you rename or move the item.
Use Insert Sitecore link
With Insert Sitecore Link, you can insert a link in a Rich Text field to:
-
An item on your website – for example, to a different page on your website.
-
A media item – for example, a video or a PDF file in your Media Library.
To insert a link:
-
In the Content Editor or the Experience Editor, navigate to the text field where you want to insert a link.
-
In the Rich Text editor, select the text or image that you want to be a link and click Insert Sitecore Link .
NoteIn the Experience Editor, you can insert an internal link directly on the page. Click Insert a Link in the text field. on the floating toolbar.
-
In the Insert Link dialog, navigate to the item you want to link to.
The Insert Link dialog is different depending on whether you open it from the Rich text editor, or directly from the page.
-
If you open Insert Link directly from the page in Experience Editor, you can find the item in the content tree, or you can click List view and then search for the item.
-
If you open Insert Link from the Rich text editor, on the Internal Link tab or the Media items tab, you can find the item in a tree structure, or on the Search tab, you can search for the item.
NoteIf you want to insert a link to an item that is hidden, for example, in an item bucket, you must use the search functionality to find the item.
-
-
Select the item that you want to link to and click Insert.
Use the Hyperlink Manager
With the Hyperlink Manager, you can insert a link to:
-
An external website.
-
A media item – for example, a video or a PDF file from your Media Library.
-
An anchor in the same text field – a bookmark that links to a particular section within a page.
-
An email address – a link that opens and creates a new email in the visitor’s default email program.
To insert a link with the Hyperlink Manager:
-
In the Content Editor or the Experience Editor, navigate to the item or page where you want to insert a link and open the rich text editor.
-
In the text editor, select the text or image that you want to make into a link and click Hyperlink Manager.
NoteIn the Experience Editor, you can insert an external link directly on the page from the floating toolbar.
-
In the Hyperlink Manager dialog box, to insert a link to:
-
An external website - on the Hyperlink tab, in the URL field, enter the URL of the website that you want to link to.
-
A media item - on the Hyperlink tab, click Document Manager and select the media item that you want to link to. From the Document Manager, you can also upload a new media file to the Media Library.
-
An existing anchor - on the Hyperlink tab, in the Existing Anchor field, select the anchor that you want to link to. If the appropriate anchor is not available, you must create the new anchor first.
-
An email address - on the E-mail tab, enter the email address that you want to send the email message to and enter a description in the email subject line.
-
-
If you want a hyperlink to have a tooltip that appears when the user moves their cursor over the link, enter this text in the Tooltip field.
-
For hyperlinks, in the Target field, specify how you want the link to open in a browser. For example, specify that you want the link to open in the same window or a new window.
-
Specify the style sheet in the CSS Class field.
-
Click OK.
-
To remove the link, select the link in the text editor and click Remove Link. The link is removed and the text turns into normal text.
Edit or remove a link
You can edit the link text in the Rich Text Editor.
To change an existing link, select the link text and follow the procedure to create a new link.
To remove a link, select the link in the text editor and click Remove Link. The link is removed and the text becomes normal text.