Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Shortcut/doc: Difference between revisions

Template page
templatewiki>Pppery
Actually this looks pure
 
Created page with "{{documentation header}} {{shc|redirect=yes|short|shc}} Used to show up to 9 shortcut redirects for templates. == Usage == {{shortcut|cmd}} <code><nowiki>{{shortcut|cmd}}</nowiki></code> <div style="clear:both"> {{shortcut|v|cmd|verlink}} <code><nowiki>{{shortcut|v|cmd|verlink}}</nowiki></code> <div style="clear:both"> {{shortcut|redirect=yes|a}} <code><nowiki>{{shortcut|redirect=yes|a}}</nowiki></code> <div style="clear:both"> == TemplateData == <templatedata> { "..."
Line 1: Line 1:
{{Documentation subpage}}
{{documentation header}}
This template is used to show the shortcuts which are available to a page or section of a page. It renders a box (see below for example), listing the shortcuts which redirect to a particular page or section of a page. This shortcut template is only used to display the most common and easily remembered redirects, it is not meant to display every single redirect to a page they are on.
{{shc|redirect=yes|short|shc}}
Used to show up to 9 shortcut redirects for templates.


== Usage ==
== Usage ==
# Create a redirect to the page or the section of the page. This page is named after the shortcut you want to create.
{{shortcut|cmd}}
# Insert the shortcut template on a page or the section of the page where you redirected the previously created page.
<code><nowiki>{{shortcut|cmd}}</nowiki></code>
<div style="clear:both">


== Examples ==
{{shortcut|v|cmd|verlink}}
{|
<code><nowiki>{{shortcut|v|cmd|verlink}}</nowiki></code>
! Code
<div style="clear:both">
! Result
 
|-
{{shortcut|redirect=yes|a}}
| style="vertical-align:top;" | <code><nowiki>{{Shortcut|CP}}</nowiki></code>
<code><nowiki>{{shortcut|redirect=yes|a}}</nowiki></code>
| {{Shortcut|CP}}
<div style="clear:both">
|-
 
| style="vertical-align:top;" | <code><nowiki>{{Shortcut|S}}</nowiki></code>
== TemplateData ==
| {{Shortcut|S}}
 
|-
<templatedata>
| style="vertical-align:top;" | <code><nowiki>{{Shortcut|UAP}}</nowiki></code>
{
| {{Shortcut|UAP}}
"params": {
|}
"1": {
<includeonly>[[Category:Notice templates]]</includeonly>
"label": "First shortcut",
"type": "wiki-page-name",
"required": true
},
"2": {
"label": "Second shortcut",
"type": "wiki-page-name"
},
"3": {
"label": "Third shortcut",
"type": "wiki-page-name"
},
"4": {
"label": "Fourth shortcut",
"type": "wiki-page-name"
},
"5": {
"label": "Fifth shortcut",
"type": "wiki-page-name"
},
"6": {
"label": "Sixth shortcut",
"type": "wiki-page-name"
},
"7": {
"label": "Seventh shortcut",
"type": "wiki-page-name"
},
"8": {
"label": "Eighth shortcut",
"type": "wiki-page-name"
},
"9": {
"label": "Ninth shortcut",
"type": "wiki-page-name"
},
"align": {
"label": "Force alignment",
"description": "Overrides the default alignment (right-aligned)",
"example": "left",
"type": "string"
},
"margin": {
"label": "Margins",
"description": "Override the default margins (default: 0em, 0em, 1em, 1em)",
"type": "string"
},
"redirect": {
"label": "Redirect?",
"description": "Changes the title from 'Shortcut' to 'Redirect' if set",
"type": "string",
"autovalue": "yes"
}
},
"description": "Shows a floating box that will list the shortcuts to the page or section.",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"align",
"margin",
"redirect"
],
"format": "inline"
}
</templatedata>
 
<includeonly>
[[Category:Documentation_templates]]
</includeonly>

Revision as of 19:05, 16 June 2025

This is the documentation page. It should be transcluded into Template:Shortcut. See Template:Documentation for more information.
Redirects

Used to show up to 9 shortcut redirects for templates.

Usage

Shortcut

{{shortcut|cmd}}

Shortcuts

{{shortcut|v|cmd|verlink}}

Redirect

{{shortcut|redirect=yes|a}}

TemplateData

Shows a floating box that will list the shortcuts to the page or section.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
First shortcut1

no description

Page namerequired
Second shortcut2

no description

Page nameoptional
Third shortcut3

no description

Page nameoptional
Fourth shortcut4

no description

Page nameoptional
Fifth shortcut5

no description

Page nameoptional
Sixth shortcut6

no description

Page nameoptional
Seventh shortcut7

no description

Page nameoptional
Eighth shortcut8

no description

Page nameoptional
Ninth shortcut9

no description

Page nameoptional
Force alignmentalign

Overrides the default alignment (right-aligned)

Example
left
Stringoptional
Marginsmargin

Override the default margins (default: 0em, 0em, 1em, 1em)

Stringoptional
Redirect?redirect

Changes the title from 'Shortcut' to 'Redirect' if set

Auto value
yes
Stringoptional