Statistics Explained

Tutorial:Redirect page

This tutorial explains the format and functions of a redirect page. A redirect page has no content of its own but when clicked sends the viewer to another page with content (it can also redirect to another redirect page, but this case of double redirects is to be avoided and replaced by single 'direct' redirects).

Format

A redirect page simply consists of the following line and should in principle have no other content:

#redirect [[Target page]]

In Statistics Explained redirect pages are only used in the Glossary[1], and they are also added to the relevant (glossary) category pages.

Redirect pages

However, for redirect pages which include abbreviations and may constitute up to 25% of all glossary items, there is a problem. Although they function perfectly for redirecting (e.g. Glossary:EU/fr=>Glossary:European Union (EU)/fr=Glossaire:Union européenne (UE)), it seems impossible with the present Mediawiki version and tools to display them properly in a glossary category page: 'EU/fr' is shown rather than 'UE' which totally destroys the usefulness of a theme category page or a list of abbreviations. So until this is solved technically, an alternative approach has to be taken for non-English redirect pages (taking UE=>Union européenne redirect as an example):

  • instead of 'Glossary:EU/fr', a pseudo-English redirect page 'Glossaire:UE' is created (in a new namespace 'Glossaire:', 'Glossar:' etc);
  • adding level-1 heading is not necessary, the page already has the name which should and does appear on top;
  • the item name to be displayed has to be added manually, like with the normal other-language glossary pages: [[Category:Abbreviations/fr|UE]];

There are some disadvantages:

  • there is no link, like for other pages, with the equivalent in other languages - this is not a big problem as users normally do not see this page but the destination page where other-language versions can be accessed in the normal way;
  • as this is an ad hoc solution not consistent with the way languages are handled elsewhere, the items should be moved as soon as the technical problem is overcome, to the proper page name 'Glossary:EU/fr'; this will not involve too much work as the content itself need not change
  • the display in the category pages is better but still not optimal: instead of 'UE' as should be the case or 'EU/fr' in the unacceptable standard way, it is displayed as 'Glossaire:UE' mixed with regular items not preceded by 'Glossaire:' but in the proper alphabetical place.

Weighing these disadvantages against the urgent need for the redirect pages and the probability that a solution will not be fast and easy (possibly needing new version of Mediawiki, at the earliest by mid-2013), the next best solution is to be implemented.

Example

The wikitext for the redirect glossary page Glossary:EU consists of these two lines:

#REDIRECT [[Glossary:European Union (EU)]][2]

[[Category:Abbreviations|EU]] [[Category:EU institutions glossary|EU]] [[Category:Geography glossary|EU]] [[Category:Glossary|EU]] [[Category:International organisations glossary|EU]]

Functions

When a redirect page is clicked (in an article, search dropdown, ...) it redirects to a content target page. An indication that this has happened is shown in an additional line just below the title of the content page, also mentioning the source redirect page which can be clicked to access and possibly edit the redirect page without being redirected again).


For instance, when clicking Glossary:EU:

Redirect to content page.png


xxxxx

Twin redirects for non-English glossary pages

See also

Notes

  1. Redirect pages can be created in other contexts than the glossary, most commonly when moving an article to another name leaving the option 'Leave a redirect behind' ticked instead of unselecting it as is usual; these redirect pages can be necessary in certain cases (for instance when other articles still link to the original article name), but they should remain temporary and be deleted when the more permanent solution has been implemented.
  2. The command 'redirect'/'REDIRECT' is not case-sensitive.