Procedure 3: Linking to a modal (pop-up window) on the same page
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).
Introduction
If you've completed the introductory training, you'll have already encountered linking to modal windows from the same T4 page.
This page builds on that tutorial with in-depth guidance and full lists of template support for this type of link.
How to create this type of link
Preparation
You must have a modal set up and assigned an ID that's unique to the page it's on in order to link to it. The introductory training covers how to do this.
Methods
The method to use will depend on the template you're using. If you're not sure which method to use, refer to template support.
Method A: Using a text editing window
Difficulty level: Foundation
- Type your link text into the editing window of the template you want to link from.
- With your mouse, select (highlight) the link text you've just created.
- Click on the 'Insert/edit link' icon in the editing ribbon of the editing window.
- Select 'Link to external site' or use the keyboard shortcut CTRL + K.
- In the URL box type #modalIDlink, replacing ID with the ID of the modal you want to link to, for example #modal1link or #modal12link.
- Where it says 'Open link in current window', you do not need to change this to say 'New window' – you can leave this setting as it is.
- Save and approve your edit.
- Preview your edit to check that the modal opens as intended.
Method B: Creating a full panel link
Difficulty level: Foundation
- In the Panel template, go to the field 'Full panel link (external page)' and enter either:
- the ID number alone
or - #modal[ID]link, replacing ID with the ID of the modal you want to link to, for example #modal1link or #modal12link.
- the ID number alone
- Save and approve your edit.
- Preview your edit to check that the modal opens as intended.
Method C: Using a URL field
Difficulty level: Foundation.
- In the URL field type #modalIDlink, replacing ID with the ID of the modal you want to link to, for example #modal1link or #modal12link.
- Save and approve your edit.
- Preview your edit to check that the modal opens as intended.
Modal management
Naming a modal
It's a good idea to include the ID number of your modal in its T4 name so that you don't have to open it to find that information.
Deleting a modal
Modal links are static. This means that when you delete a Modal, T4 won't warn you of any links pointing to it, so you will need to find and delete these yourself to avoid broken links.
For this reason, if your page contains a lot of content, or a lot of links, it's a good idea for any piece of content that links to a modal to state in its T4 name that it contains a modal link with the ID of the modal, for example 'More information (link to modal 4)'.
This is so that you (or another editor) won't later have to hunt through your page to find any links to a modal that needs to be renumbered or removed.
Changing a modal's ID number
If you ever change a modal's ID number:
- you must remember to also change that number in:
- that modal's T4 name.
- any link on your page that opens that modal. All modal links are static (not dynamic) which means that T4 won't automatically update them when they're altered. If you don't manually change the number in those links then they will break.
- the T4 name of any content linking to that modal (if indicated there).
- be aware that any links on other pages to your modal will break. You may not be aware of them to update them, and T4 has no way of tracking them. Editors managing these sorts of links should periodically check them so that they can be edited if necessary, but you should be aware that it may create this extra work.
For these reasons, changing the ID of a modal should be undertaken with caution. It's not necessary to endure a convoluted numbering order if changing modal numbers would make editing clearer and more logical, but this should not happen frequently.
Template support
The templates listed below all support this type of link. The tables will show you which method to use for each template field.
Note that some of the fields listed here state 'external page' or 'external website'. You can ignore this – it doesn't mean you're linking to an external location.
| Template | Field | Method |
|---|---|---|
| Accordion pane | Pane content | A |
| Additional quote | Quote | A |
| Quotee name | A | |
| Call to action links | Link url 1-3 (external page) | C |
| Carousel entry | Link URL | C |
| Feature box | Text | A |
| Panel header link (external website) | C | |
| Generic highlight button | Button URL (external page) | C |
| Highlight content panel | Text | A |
| Quotee name | A | |
| Messages billboard | Msg URL 1-4 (external page) | C |
| Modal window | Text | A |
| Page structure v1 | Content | A |
| Page text | Content | A |
| Panel | Text | A |
| Full panel link (external page) | B | |
| Profile panel | Description | A |
| Website | C | |
| Profiles item set | Profile text 1-8 | A |
| Quote | Quote | A |
| Quotee name | A | |
| Tab | Tab content | A |
| Tabs container | Tab 1 content | A |
| Video embed | Description | A |
| Template | Field | Method |
|---|---|---|
| Accommodation residence filter panel | Link (external page) | C |
| Accordion panel | Content | A |
| Accordion panel for Funders/Faculties (PGR) | Content | A |
| Accordion panel for Funding list (PGR) | Content | A |
| Campaign landing page v2 | Header KSPs | A |
| Header KSPs footnotes | A | |
| Text above form | A | |
| Overview text | A | |
| KSP1-4 text | A | |
| KSP footnotes | A | |
| Carousel 1-4 text | A | |
| Optional text | A | |
| Panel 1-4 text | A | |
| Optional button link (external page) | C | |
| Carousel interface | Link URL | C |
| Carousel panel | Link URL | C |
| Carousel panels set | Panel 1-4: text | A |
| Panel 1-4: Full panel link (external page) | C | |
| Carousel panels set interface | Panel 1-4: text | A |
| Panel 1-4: Full panel link (external page) | C | |
| Gallery image | Image caption | A |
| Hero section page header | Text | A |
| Modal window | Text | A |
| Page structure v2 | Content | A |
| Page text | Text | A |
| Panel | Text | A |
| Full panel link (external page) | B | |
| Panel & Modal Combo | Panel Text | A |
| Modal Text | A | |
| Panel blog feed | Text | A |
| Panel set blog feed | Text | A |
| PG: On-demand video | Text | A |
| Profile set | Profile 1-6 text | A |
| Quote template | Quote | A |
| 'Read more' text | A | |
| Tab container | Tab 1 content | A |
| Tab entry | Tab content | A |
| Tab entry blog feed | Tab content | A |
| UG: On-demand video | Text | A |