Let’s say you would like to display a PDF, word document, spreadsheet or other File on your website. How do you do it? Here is a tutorial to help you out. We have two options for this tutorial, a video and a text description. The video will appear first, followed by the text and screenshots.
You are able to control the file name of your PDFs/documents within the CMS before and after they have been published live to your website. We will use the example of updating the file name of a File content item already within the CMS. This is common for updating files from month to month or year to year.
When you edit a File content item, you will notice a number of fields. We will explain the purpose of the three underlined ones:(more…)
You may notice file type icons appearing after your links that link to files. This includes Word documents, Excel spreadsheets, PDFs, and PowerPoint presentations. Here is an example from the Research website:
Where do these icons come from? They are automatically inserted after your link in most modern browsers. They will not automatically appear in most versions of Internet Explorer. They are automatically inserted to indicate to the user what type of file is being linked to. This helps to let them know what to expect and what they may be downloading.
Note: The icons will not appear automatically when previewing in the CMS. They will appear, however, in most browsers once your web page is published to the live website.
You may guarantee that these icons show up at all times and in all browers. To do so, you will need to add a class to the HTML code of your link. If you are linking to a PDF, add a class of “pdf”. The same goes for “word” (Word Doc), “excel” (Excel Spreadsheet), and “ppt” (PowerPoint). Here is some sample code:
<a href="myfile.pdf" class="pdf">Annual Report</a>
Note that the code will be more complicated for CMS links, but the concept is the same. Simply add a class to your link and your file icon will always appear regardless of browser.
There are a number of good tips to keep in mind when you name your folders, files, and web pages. These tips will help to keep your URLs short and specific to what they involve. Good file naming will also help with search engine optimization.
- Don’t include spaces or other punctuation in your folder or file name. If necessary, use dashes in this manner: “my-new-file.pdf”.
- Try to keep your folder or file name short while still making sense.
- Use key words.
- Use lowercase.
- Pick a filename and stick to it. Besides our CMS restrictions, not renaming your file will keep the file indexed by any search engines.
- Try to avoid using years, version numbers, or other naming patterns that date a file. Maintenance is reduced and user experience is sustained when you can just overwrite the old file with the new one each year and keep the filename the same. However, for archiving purposes, different filenames may be important (e.g., FY09). To ensure that your new filename updates properly, please let the CMS team in University Marketing and Communications know when you change a filename.
Let’s say that you would like to display a PDF, word document, spreadsheet or other file on your website. How do you do it? We have two options for this tutorial, a video and a text description. The video will appear first, followed by the text.
Naming Your File
The first step is to make sure your file is properly named. If you are uploading a file that is new to the CMS, you can name it whatever you like and create a new content item. If you upload the same document annually, consider giving it an overarching name the first time you upload it (e.g., fall.pdf). We have some guidelines to help you have good file naming conventions. If you are updating an existing content item, make sure the filename of the file you are uploading matches the filename of the old file. For instance, if the file on your website is called “fall-2009.pdf” then you should make sure that the file you are uploading into the CMS is called “fall-2009.pdf”.