Template:Shortcut
From MeritBadgeDotOrg
m (testing) |
(Modifying template to handle multiple shortcut names) |
||
| Line 1: | Line 1: | ||
{{{1{{{1|}}}|<table style="border: 1px solid #999; background: #fff; margin: .5em .5em .5em 1em; padding: 5px; float: right" class="noprint"> | {{{1{{{1|}}}|<table style="border: 1px solid #999; background: #fff; margin: .5em .5em .5em 1em; padding: 5px; float: right" class="noprint"> | ||
| - | <th id="shortcut" align="center" valign="top"><small>[[Template:Shortcut|Shortcut]]:<br />{{{1|}}}</small> | + | <th id="shortcut" align="center" valign="top"><small>[[Template:Shortcut|Shortcut]]:<br />{{#ifexist:{{{1|}}}|[[{{{1}}}]]|{{{1|}}} }}{{#if:{{{2|}}}|<br />[[{{{2}}}]]}}{{#if:{{{3|}}}|<br />[[{{{3}}}]]}}{{#if:{{{4|}}}|<br />[[{{{4}}}]]}}{{#if:{{{5|}}}|<br />[[{{{5}}}]]}}</small> |
</table>}}}<includeonly>[[Category:Shortcuts|{{PAGENAME}}]]</includeonly><noinclude> | </table>}}}<includeonly>[[Category:Shortcuts|{{PAGENAME}}]]</includeonly><noinclude> | ||
---- | ---- | ||
| - | This template is | + | |
| + | This template is used to show a short ''alias'' for the given page. | ||
| + | |||
| + | This template does NOT create shortcuts; it just displays the shortcut in a standardized format on the desired page. The optional parameter is typically a link to a shortcut. Usage within other templates, with no parameter given, will result in no output. (Hence, the very reason the Shortcut box on this page does not have a shortcut listed, because there is no shortcut to this page. But, since the template's <code>code</code> resides within this page, the shortcut box displays here, too... just as it should.) | ||
| + | |||
| + | ===Instructions=== | ||
| + | :'''Step 1:''' Determine the desired shortcut is not already in use. E.g., Enter <code>BSA</code> in the search box (to the left) and select '''Go''', not Search. | ||
| + | |||
| + | :'''Step 2:''' Create a REDIRECT page and place the following text therein: | ||
| + | ::<nowiki>#REDIRECT [[</nowiki>'''''PageName'''''<nowiki>]]</nowiki>— Where the '''''PageName''''' is the name of the page that you want the Shortcut to automatically go. | ||
| + | |||
| + | For example, [[MB:MB]] is a shortcut page that redirects to [[MeritBadgeDotOrg:Merit Badges]], the actual page where the desired information resides. | ||
| + | |||
| + | |||
| + | ===Notes=== | ||
| + | *Shortcuts must be, well, ''short''. | ||
| + | *Shortcuts must be easy to remember. | ||
| + | |||
| + | End results: | ||
| + | *One, if somebody types <code>BSA</code> into the search box, they're automatically sent to the <code>Boy Scouts of America</code> page via the REDIRECT. | ||
| + | *Two, the shortcut is displayed on the | ||
| + | |||
| + | I know this seems like a long way to get from here to there; but, that's how the '''''wiki''''' works. | ||
| + | |||
| + | |||
| + | |||
[[Category:Templates|{{PAGENAME}}]]</noinclude> | [[Category:Templates|{{PAGENAME}}]]</noinclude> | ||
Revision as of 12:06, April 10, 2007
This template is used to show a short alias for the given page.
This template does NOT create shortcuts; it just displays the shortcut in a standardized format on the desired page. The optional parameter is typically a link to a shortcut. Usage within other templates, with no parameter given, will result in no output. (Hence, the very reason the Shortcut box on this page does not have a shortcut listed, because there is no shortcut to this page. But, since the template's code resides within this page, the shortcut box displays here, too... just as it should.)
Instructions
- Step 1: Determine the desired shortcut is not already in use. E.g., Enter
BSAin the search box (to the left) and select Go, not Search.
- Step 2: Create a REDIRECT page and place the following text therein:
- #REDIRECT [[PageName]]— Where the PageName is the name of the page that you want the Shortcut to automatically go.
For example, MB:MB is a shortcut page that redirects to MeritBadgeDotOrg:Merit Badges, the actual page where the desired information resides.
Notes
- Shortcuts must be, well, short.
- Shortcuts must be easy to remember.
End results:
- One, if somebody types
BSAinto the search box, they're automatically sent to theBoy Scouts of Americapage via the REDIRECT. - Two, the shortcut is displayed on the
I know this seems like a long way to get from here to there; but, that's how the wiki works.
