This sections is about how to create links.
Link text design
Remember that the link text must be relevant, rich in content and specific - the visitor must understand where the link leads. We also recommend that you place the link directly below the text rather than in the middle, as it will be easier for the visitor to understand that it is a link.
If you are linking to a file, keep in mind that it should be clear that it is a document that opens when you click on it. You should clearly state the type of document, size and information that the link will open in a new tab, in parentheses. For example:
"Download the Annual Report for 2019 (PDF, 52 MB, new tab)"
Linking something internally means that you link to pages within the current website, ie not that you link to another website within Lund University. For example, if you link to staff pages from lu.se, it is an external link. Another example; if your organisation has both a Swedish and an English website, then it is an external link if you link from the English to the Swedish and vice versa.
Never print entire links internally
When you link internally, you should always use the function to search for the pages (we go through it below). This is because it works better for internal pages because the link always points straight to the goal and continues to work even if the page is renamed or moved in the structure.
You can also write the last part of the page link, e.g. if you want to link to https://lathunden.prodwebb8.lu.se/links you can only write /links in the URL field. Then the linking will still work if the page changes location later.
Another option is to use the page's shortlink, which is printed in the form of "/node/" and the page's number. For example. http://lathunden.prodwebb8.lu.se/node/657 (which is a shortlink to the page in the example above) can be written as /node/ 657 in the URL field.
Create internal link in body text
To link internally, use the chain button with a plus sign in the body text toolbar. There you can search for pages, documents and other content that is on your site (this function is called Link).
- Mark the text you want to link to.
- Press the link button with a plus sign.
- Start typing the title of what you want to link to in the "URL" field and select the correct page in the list of suggestions. (Pages must be published in order to be found with the search function.)
- In the Title field you can type a text that is displayed if you hover the link.
- In the "Extended" tab, you can check "Open in new window/tab" to open the page in a new tab. (Files should always be opened in a new tab for accessibility reasons.)
- Press Save
External links lead your visitors to pages outside of your site. When you formulate your link text, you must formulate it so it appears that the link leads out from this website and ends up elsewhere.
Create external link in body text
- Mark the text you want to turn into a link.
- Press the link button without a plus sign.
- Enter the link you want to direct the visitor to in the "URL" field.
- Press OK
Linking within the same page is useful if you have a really long page with lots of text and want to be able to lead the visitor directly to a specific paragraph.
Create an anchor link
- Place the cursor in front of or above the text/paragraph you want to link to and press the flag (anchor) in the toolbar.
- Enter the appropriate name in the "Anchor name" field to be able to find the anchor in your link options later.
- Create the actual link you want to link from by writing the appropriate link text.
- Mark the text you want to turn into a link and press the link button without a plus sign
- In "Link type", select "Link to anchor in the text"
- Select your desired anchor from either "By Anchor Name" or "By Anchor ID" lists
- Press OK
When testing your anchor links, remember to do so in logged-out mode. Otherwise, in some cases, the black administration menu might cover the heading you have "flagged" so it becomes difficult to see what is happening.
Right-click on the anchor (the symbol of a flag) in the text and select "Remove Anchor", or delete in the same way as you delete text (backspace).
Link to e-mail
When you write an e-mail address in Drupal, it automatically becomes a link. You should always print out the email address in its entirety, so that it becomes clear who is the recipient of the email and what happens when the visitor clicks on the link. This also makes it easy for a visitor to copy the address and paste it into their email program, or click on it.
There is a spam filter in Drupal that protects email links.
Link in pictures
Sometimes you want to make an image clickable, in other words; make a link of it. It could be that it should lead to a pdf or perhaps to a larger version of the image. It can also be important for accessibility reasons if the image represents graphics that are difficult to see if it cannot be enlarged.
To make an image clickable in the body text, select the image by clicking on it, and select one of the two linking tools (which we went through in the sections on internal and external links).
If you want to link to an enlargement of the image, you need to get the URL of the image.
Double-click on the image in the body text and press the name under "Selected entity". Now a page opens where you can see the image, go into edit mode and e.g. see where the image is used. Here you go to "Edit" mode, and then press the file name under "Image". The URL you find in the window that opens with the image is the one you should use if you want to link to the image itself.
Links as buttons or list
With the tool "Styles" you can change the appearance of links. Start by making sure that your links are in a bulleted list, then highlight the text and tap Styles. There you have two options on link styles.
List with links
The links are listed below each other with a line between each.
Links as buttons
The links are displayed as buttons. Remember to have short texts in the links if you use the buttons, and remember to only use the buttons on shorter lists.
Select the link you want to delete and press the link button with a cross, or right-click and select "Unlink".
- Check that the link you wrote is understandable even when it is read out of context. Avoid "Read more" or "More information".
- Write links that indicate where the link leads and what happens when the user follows the link.
- Indicate directly in the link text whether the link opens a new window, leads to an external website or leads to a document. Examples: "Download the Annual Report for 2019 (PDF, 52 MB, new tab)" or "Read more about education at lu.se".
- Show clearly if images are linked, and write an alt text that primarily states the link's goals and function.
- Do not use title text. Always write all relevant information about the link directly in the link text.
- Avoid links directly in the body text, instead place them on a separate line below the paragraph. Exceptions are proper names that are also a web address, such as Antagning.se
If you have any questions, please contact servicedesk [at] lu [dot] se
Always enter the URL of the website or page to which the case concerns.