Linking to files
This guide will help you make sure you're linking to files such as PDFs, Word documents and spreadsheets in the right way.
Is a file the best way to communicate your content?
As a general rule it is better to present content as web pages for your users, instead of as downloadable documents. This is because:
- web pages are more navigable than files – it is easy to link between them
- our CMS web pages are optimised for mobile, whereas content in files may not be
- there is no guarantee that files you upload will meet the accessibility needs of users and their technology
- once downloaded to a visitor's device, you can no longer update the content within the file
- files can require additional software for visitors to read or view
- the indexing of files by search engines doesn't happen as regularly as it does for normal web pages
- files can be large in size and take a long time to download
- users may find it hard to locate a file once it has been downloaded onto their device
- erasing/replacing content within files can be difficult (see below)
The exceptions to this are:
- if the document needs to be printed
- if the content has specific visual design, eg a map
- if the material is hard to convert in a meaningful way to a web page
- if the material is excessively large or complex, eg a long report
If you feel that your file fits one of the criteria above then you can upload it into the CMS and make it available as a download using the guides below.
Any file you upload needs to be compliant with accessibility legislation.
Follow the instructions on our Media library help page to upload a file.
We recommend uploading documents in PDF format (or xls for spreadsheets) for usability purposes.
You can upload the following popular types of documents to your site:
- Microsoft Word (.doc)
- Adobe PDF (.pdf)
- Adobe Shockwave (.swf)
- Quicktime by Apple (.mov)
- Microsoft Excel (.xls)
- Comma-separated values file (.csv)
- Microsoft Powerpoint (.ppt) or Powerpoint Show (.pps)
Full list of file types compatible with the CMS:
- fodg key numbers pages.
To insert a link to a file using the link selector in the Editor:
- Select the text you want to use as the link text
- Click the link button in the toolbar
- The link selector is an autocomplete lookup field – start typing the file name
- All files in the CMS are indexed in the lookup, so be sure you choose the right one. Typing a word from the URL will not work. Files appear below pages in the results box so you may need to scroll down
- Check the file you selected is shown as a /media/0000 (where 0000 is a number) in the link box
- Add the file type and size to the link text – for example Student admissions policy (PDF, 3MB)
- Click Save
To insert a link to a file using the single field link selector:
- Go to the Media tab within your Group, find the file and right-click its name. Select 'Copy link address' (Chrome), 'Copy link location' (Firefox) or 'Copy link' (Safari)
- Go to the single URL field where you want to insert the link to the file – typically in Related information or in a Component
- Paste the link you have copied. It will appear as something like https://cms.shef.ac.uk/media/26/download
- Important: Remove https://cms.shef.ac.uk from the start of the link so that just the /media/26/download part of the URL is remaining
- In the adjacent field write the link text, making sure you include the file type and size – for example Student admissions policy (PDF, 3MB)
- Click save
It is possible to replace a file with a different version, while maintaining any existing links to the file. To do this:
- Go to your Group media library and locate the file
- Click Edit then Remove
- Browse to locate the new version of the file on your computer
- Click Save
Note, as you are uploading the new file into the same container, the filename of the new file does not need to be the same as the one it is replacing. If you've done this correctly then any existing links should continue to work.
It is not possible to easily delete a file from the CMS. Contact us if you have concerns about a published file which you'd like removed.
- Think twice before uploading any file. Can it be created on a page as normal web content instead?
- When linking to the file, include the file type and size in the link text
- When linking to a file using the single field link selector:
- never link directly to a file using a URL such as /sites/default/files/2019-09/policy.pdf – instead you should always link to a URL in a format like /media/26/download
- always double check that you have removed the https://cms.shef.ac.uk from the start of the link
- We'd like to further improve file management in the CMS. If you're unsure about anything, please contact us
Get in touch
If you have CMS questions or are stuck then get in touch and we'll do our best to help.