Creating hyperlinks in webpages
Quick Reminder
- Highlight the text you wish to add a link to.
- Click on the Insert Link icon in the toolbar.
- Choose the type of thing you wish to link to.
- Enter the required info.
- Click
Creating links
- First make sure you have some text to add the link to. Type out some text into the Content field if necessary, eg. "Read more about us".
[note] It's bad practice to use words such as "click here" as the link text, it's better for the clickable text to be the title or description of what's being linked to. For example, instead of "Click here to read more about widgets", it would be better to just say "Read more about widgets". [/note]
- Click and drag across the text that you'd like to add a link to, to highlight it.
- Click on the Insert Link icon in the toolbar.
- Choose the type of link you'd like to create:
Link to another page on your website (internal link)
- Make sure Page on the site is selected
- Click on the Page dropdown field
- Select a page to link to, using the black arrows to drill down if necessary.
- Click
[note] There are different processes for "internal" and "external" links because when pages on a SilverStripe installation are moved or deleted, the links in other pages on the site are automatically changed to the new pages location. This allows you to quickly move pages around without the worry of breaking the site's structure or checking every page in the site for broken links.
If you enter in an internal link URL in the external link field, SilverStripe CMS is usually smart enough to change the link to an internal link. [/note]
Link to a different website (external link)
- Make sure Another website is selected
- Enter the full website address to link to in the URL box. Must start with http:// or https://
- Click
Link to an e-mail address
Link to download a file
- Select Download a file
- Click on the button (Note: If you don't see this button, follow the instructions here)
- In the box that opens locate the file on your computer and click Open/Choose
- Once the file has uploaded, click
[note] One other option is to hyperlink to a document that you have uploaded to your website, such as a PDF file, DOC file, audio file, video file, or any sort of file that is not a webpage. This is a more advanced topic, which we will cover in Linking documents. [/note]