Web Accessibility Training

Procedure 2: Linking to a specific place within a T4 webpage (includes same-page links)

Advisory

The information on this page is only applicable if you're editing the University webpages using T4. It presumes that you have already completed the beginners and advanced level of the T4 basic training (a link for staff only - opens in new window).

Are you in the right place?

If the answer is a confident 'yes' (and you're aware of the exceptions), you can jump directly to how to create this type of link.

What this procedure will do

This procedure is for linking to a specific place within a T4 webpage. As an example, this link directly to information about Nelson the cat (opens in new window) demonstrates how this type of link functions – you'll find that it loads the page part way down, rather than at the top.

If you would rather:

  • Simply link to another T4 page (so the browser loads at the top of the page, not in a specific place), follow procedure 1.
  • Link to a specific place within a webpage outside T4, follow procedure 10.

If you're not sure whether the page you're linking to is in T4

Checking first can save you from wasting time hunting in T4's navigation for a page that isn't there. Don't rely on webpage appearance to guide you, as sometimes a page can look as though it's in T4 when it isn't. To check, you can use our content locator.

Media Library links

The procedure here only applies to webpages – you can't link to a specific place within a Media Library document (i.e. unfortunately there is no procedure for that at present).

Exceptions with special procedures

There are three exceptions to this specific-place procedure, which have procedures written especially for them. So if you would like to:

  • Link to an accordion, follow procedure 3.
  • Link to a modal (pop-up window) in the page you're currently editing, follow procedure 4.
  • Link to a modal in a different webpage, follow procedure 5.

How to create this type of link

Preparation

The specific item of content that you're linking to will need to be in a separate template to the one you're linking from. This is naturally the case when you're linking to a different T4 page, but it's also true if you're linking within the page you're currently editing.

Clicking the link will take the reader directly to the start of content within that other template. If that template contains a lot of content, and the element you want to bring to your readers' attention is not at or near the beginning of it, you may wish to divide it into separate templates first.

Methods

The method to use will depend on the template you're linking from. If you're not sure which method to use for your template, refer to template support.

You may find other ways of creating this type of link beside the ones listed here, but Methods A and B should be used whenever possible, as they're better than other techniques in reducing the risk of broken links.

Method A: Using the content editor

Difficulty level: Foundation

  1. What do you want to use as link text?
    • Text of your own choice: go to step 2.
    • The name of the content you're linking to: go to step 4.
  2. Type your link text into the editing window of the template you want to link from.
  3. With your mouse, select (highlight) the link text you've just created.
  4. Click on the 'Insert/edit link' icon in the editing ribbon of the editing window.
  5. Select 'Insert content link'.
  6. In the site navigation that appears, select the page you want to link to. (This will be the page you're currently editing if you're linking to a location within that page.) You can type the name of the page into the filter box if you're having difficulty locating it in the site structure.
  7. When you've selected your page, you'll then see the list of its content (templates). Select the one you want to link to. (Don't select a modal as your link won't work – refer to modal options for these.)
  8. Save and approve your edit.
  9. Preview your edit to check that the link takes the reader to the intended place.

Method B: Using a selection button

Difficulty level: Foundation

  1. Click the 'Add content link' button.
  2. In the site navigation that appears, select the page you want to link to. (This will be the page you're currently editing if you're linking to a location within that page.)
  3. You'll then see the list of content (templates) for your chosen page. Select the one you want to link to. (Don't select a modal as your link won't work – refer to modal options for these.)
  4. Save and approve your edit.
  5. Preview your edit to check that the link takes the reader to the intended place.

Method C: Entering a web address

Difficulty level: Advanced. If you need help with this method, please email the web team at digitalteam@exeter.ac.uk and they will be happy to create the link for you.

This method is not recommended, but it's included here as it's the most reliable way to link to a specific place within a T4 webpage if you're linking from one of the following templates:

  • Carousel entry (approved responsive template)
  • Carousel interface (recruitment template)
  • Carousel panel (recruitment template)

We recommend that you use a different template to create this type of link on your page if possible, but if you need to link from one of these three templates, you can do so following the method here.

It works by linking directly to the unique identifier (ID) that T4 assigns to a template, so the steps here involve looking at the code of a webpage, but only to find the ID number.

  1. Go to the live version of the page you want to link to.
  2. Right click on the page and select 'View page source'. A new tab or page will open displaying the code of the page. You can't cause any harm to the code in this environment, so don't worry that you might edit something by mistake.
  3. Press CTRL and F. The 'find in page' box will appear. Type the text that you want to link to so that you can locate it within the page code.
  4. From the location you've found, scroll up slowly until you come to the first line that looks like <span id="d.en.12345"></span> ('12345' here is an example number).
  5. In the URL box of your template, type the web address of the page you want to link to, followed by a hashtag and the id you located. For example: https://cahrt.exeter.ac.uk/theology/research/#d.en.97542.
  6. Save and approve your edit.
  7. Preview your edit to check that the link takes the reader to the intended place.
Notes

As this type of link is not fully dynamic, the link will break if there is change in the web address of the page you're linking to. This will happen if:

  • the page you're linking to is moved to a different location.
  • the page's containing folder is renamed.
  • the item of content is moved to a different page.

For these reasons you should periodically check the link to make sure it still works. (If you're creating a link for someone else, please advise them of this.)

The link won't break, however, if:
  • the page you're linking from is moved or renamed.
  • the content (template) you're linking to is renamed, edited, or moved to a different location (T4 list order) on the same page, because T4 is using that contents ID number (rather than a name) to locate it, and that number never changes.

If you're familiar with using in-page anchors, Method C is a more stable alternative, as it's easy for someone to delete an anchor by mistake, whereas the ID is unaffected by content edits.


Template support

The templates listed below can all be used to create this type of link. The tables will show you which method to use depending on the field (place in your template) where you intend to create the link.

Note that some of the fields state 'internal page'. 'Internal' here means a page hosted in T4; University webpages hosted by other platforms don't fall into this category, which is why you need to be sure that the page you're linking to is in T4. If it's not, you should follow procedure 10 instead.