Linking to a specific location in content

In long pieces of content, it can be helpful to include a table of contents that provides links to locations within the same document. Alternatively, sometimes you may want to link to a specific section of an article from a link outside that content. While the WYSIWYG editor does not provide an explicit tool for setting up and referencing these anchor points, it can be done with a combination of Code View and Inserting Links.

How to link to a specific location in content

Creating a link to a specific location involves adding an identifier to the location you want to link to and then referencing that location using a link. Setting up these links is something that you can do after you have written your article. Section headers or titles are ideal locations to act as a reference.

Applying an id to a destination

While you are editing your content in the WYSIWYG Editor: 

  1. Select the header or title that you want to link to.
    A selected header.
  2. While maintaining this selection, select More Misc and then  Code View. In Code View, your selected text will remain selected.
  3. HTML tags surround the selected text. In the screenshot above, these tags are <h2> </h2>, which indicates that this text is a second-level heading. Within the first tag, add id="description", where description should be a brief identifier for this location. This example uses  id="section4".
    Adding an id to the header element.

Creating a link to a destination id inside the same content

  1. Select the text or image that you want to link from.
    Selecting what will become the link.
  2. While maintaining this selection, select  Insert Link and in the URL text field enter the id of the location you want to navigate to preceded by #. For example, #section4.
    Inserting a link.
  3. Select Insert.

Creating a link to a destination id in another piece of content

  1. Copy the relative URL of the content you want to link to and append the id of the location in that content preceded by #. For example, the relative URL that would link to #section4in a policy article would be the green text below.
    https://{your digital workplace}/HR/policies/TimeOff#section4
  2. Back in the content that you want to link from, select  Insert Link and in the URL text field, enter the URL from step 1.
  3. Select Insert.