Template:Shortcut compact/doc

{{Shortcut compact}} is a compact version of the {{shortcut}} template, for use in vertically-constrained locations, such as alongside list items.

It flows to the right of the page, displaying all the shortcuts in a single line of text.

Usage[edit]

Usage is similar to the {{shortcut}} template, see full documentation there. This template accepts up to five shortcuts as parameters. However, in most cases you will only want to display one or two shortcuts with this template, otherwise it may get too wide. Use {{shortcut}} if you need to display more than two shortcuts in the same box. The template may be useful on other pages where multiple shortcut boxes would crowd together vertically.

Examples[edit]

Code Result
{{Shortcut compact|BTW:V}}
 Shortcut:   BTW:V 
{{Shortcut compact|BTW:V|BTW:VERIFY|BTW:SOURCE}}
 Shortcuts:   BTW:V   BTW:VERIFY   BTW:SOURCE 

Anchors[edit]

Unlike {{Shortcut}}, this template does not place anchors automatically at its location. To enable displayed shortcuts to link to positions other than section heading names, use the {{Anchor}} template alongside this template.

Adding an anchor automatically tends not to work correctly when the displayed shortcut itself contains a fragment identifier (an anchor name after a number sign character), since the anchor should only consist of the fragment identifier, but the template cannot parse out the fragment from the rest of the displayed shortcut string. Automatic anchor insertion works best for top-of-page shortcuts which do not normally display fragment identifiers, the kind that {{Shortcut}} is intended to display.

Displaying shortcuts with fragment identifiers saves a lot of work for a long page with many section-specific or list-item-specific shortcuts, since one shortcut page provides a redirect that can then link to any anchor on the target page via a fragment identifier.

See also[edit]