Skip to main content

Linking to other pages

Reviewed

Here I will describe how to create a link to:-

  • an internal page (one within the site),
  • an external page (one in a different website)
  • an 'anchor' within a page (internal or external).

Links in general.

Gutenberg does not allow you to just type the address into the page and expect it to create a link as this is not good practice. So, rather than typing say "see the main U.R.C. website at urc.org.uk" please type something like "see the main U.R.C. website".

The text that the website shows (U.R.C. above) is called the anchor text; The address of the target page or website is properly known as the URL. So to create a link, type in the anchor text and highlight (select) it. (drag the mouse over it while holding down the Left Mouse button, or just double click to select one word)

Now click the Link button link . It will open the 'Insert/Edit Link" dialog box which contains one field box into which you type the link. ( In Gutenberg the dialog also contains an 'Open in new tab' toggle - which I would always enable.)
Note the Gutenberg's submit button or CKEditor's submit button submit button which you must click to insert the Link address. When you have a URL already entered, there will also be this icon which you can click to open the URL in a new tab allowing quick verification of the address.

Link within our site.

It is important to miss out the "https://urc5.org.uk" bit of the URL.
Start with the leading slash which follows it: e.g. to link to this page, enter just /book/linking-other-pages as the link.

(The https:// is known as the scheme, urc5.org.uk specifies the host by using our domain name, the trailing slash and whatever follows is the path. the Path looks a little like a path to a file in windows, and exactly like a file path in Linux and Mac-OS)

Link to an external site.

Simply enter the whole URL as the link. e.g. https://urc.org.uk/who-we-are/what-is-the-urc/

Short Cut: If you first copy the URL into your clip board, perhaps from the address bar of your browser (e.g Crtl/c) then you can select the text and paste (ctrl/v or right-mouse-button > Paste). This will paste in the URL using the selected text as the anchor text. NOTE: this does not work with an internal link

Link to an anchor
within a page.

If a page contains an anchor then a URL can scroll directly to that anchor simply by appending #<anchor-name> to the link. e.g. /book/linking-other-pages#start (The anchor 'start' is on the title "Links in general" at the top of this page.)

In Gutenberg and anchor can be added in the Settings side panel under Advanced. Just type in the name you want to use which must be unique on the page.

At the moment(Jan 24) scrolling to an anchor does not play well with our sticky navbar, so it may be better to place the anchor on the item above.