Template:Shortcut/doc

Description
This is the documentation for and its sister templates. The shortcut family of templates is put into context here, but they each have their own documentation pages, see below.

A shortcut template is similar to the template, but it adds a visual box graphic to the rendered page, as well as providing an alternative name. Creating a redirect page is a requirement to fulfill the shortcut mechanism.

Usage
The characteristics of the box graphic are determined by which of the family of shortcut templates are chosen. For example, the policy shortcut box has the word policy on it for use on policy pages. The graphic alignment of the box depends on the whether it's a shortcut or a shortcut-l:
 * – right-aligned box
 * – left aligned box
 * – shortcut that also says "policy"
 * – shortcut that embeds into message boxes

This template is not normally used for articles in the main namespace, because the graphic produces an avoidable self-reference.


 * 1) Insert the shortcut template.
 * 2) Create a redirect page with the  template suffixed to the redirect. Name the page after your shortcut name.  Include the namespace name in both the shortcut name and the redirect page name. For example, substitute your own shortcut name as the title of the page, and substitute the proper namespace, then add the following as the top-line on your redirect page:
 * #REDIRECT Namespace:Title of page with
 * 1) Verify operation.  Note that shortcut templates should display in all capitals, but operate without all capitals.

Anchors
These templates automatically add HTML anchors. For example, if a shortcut box with the shortcut ATW:ADMIN is placed on the page Admin Tools Wiki:Administrators, then the link Admin Tools Wiki:Administrators will take you to the position in the page where that shortcut box is placed.

For instance, try this link:

Thus, if you make a shortcut for a section of a page, then you can use the anchor in the shortcut redirect itself. Like this:



Positioning
This template is usually placed below the section header or at the top of a page.

Before July 26, 2010, when the anchor was inside the box, this caused the section header to scroll above the page window. Fixes for this issue included:
 * Placing the shortcut above the section header; a bit confusing when editing
 * Creating the redirect to the section header, not the shortcut; this would break if the section header was renamed
 * Placing an in the section header that duplicated the shortcut

These fixes are no longer needed, but do not break the current implementation.