Jump to content

Template talk:Shortcut

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

[edit]

Hi,

I am considering proposing a rename of template:Shortcut to template:Linkbox.

Reasons to rename include:

1. The template does not enable the function of shortcut, but instead produces the display of a WP:LINKBOX
2. Some editors think that listing new shortcuts in the linkbox is required for the shortcut to work
3. Due to #2 above, LINKBOXES are often excessively populated, contrary to the advice at WP:LINKBOX

In the result produced on the page, I suggest changing the heading text in the box from “Shortcuts” to “Recommended shortcut” (singular, even though multiple shortcuts may be listed).

- SmokeyJoe (talk) 08:21, 19 January 2025 (UTC)[reply]

Question about anchors

[edit]

It says that it automatically adds the shortcut as an anchor (For example: "WP:UNCIVIL").

But does it add an anchor without the """"WP:""""?

For example, it would be nice if it added "UNCIVIL" instead of "WP:UNCIVIL" - or add both as anchors, if that is preferred.

I ask, because of pages like WP:OC, where each section has an anchor template and a shortcut template. - jc37 08:22, 22 January 2025 (UTC)[reply]

Yes, for example all of these should land at the same spot:
"WP:" is a namespace alias and can be used in place of "Wikipedia:" for any page. — xaosflux Talk 10:25, 22 January 2025 (UTC)[reply]
So if I remove the anchor template from WP:OC, and leave only the shortcut template; and then add WP:OC#OCYEAR to some other page, I will still land at the correct section? - jc37 10:51, 22 January 2025 (UTC)[reply]
Oh shoot, sorry I only anecdotally test this quickly, didn't realize both were there. So no, {{shortcut}} is not producing a named section for the anchor without the "WP". That could potentially be built in to the module. For that specific page, as there are many anchors in each section removing just one of the anchor keywords doesn't seem very useful though (and even if a shortcut is removed later, keeping the anchor could still be useful). — xaosflux Talk 11:05, 22 January 2025 (UTC)[reply]
Oh ok.
And true about OC, but I'm seeing this over a lot of policy pages. So I think it would be nice to add that in.
I don't know how the module is coded, but I think it's the difference between {{PAGENAME}} and {{FULLPAGENAME}} - jc37 11:20, 22 January 2025 (UTC)[reply]
I agree a second anchor should be created for each shortcut. I was confused as to why it wasn't working after reading the /doc. FaviFake (talk) 15:32, 18 November 2025 (UTC)[reply]

Requested move 13 February 2025

[edit]
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: not moved. (non-admin closure) Sophisticatedevening (talk) 13:52, 20 February 2025 (UTC)[reply]


Template:ShortcutTemplate:Linkbox – Reasons to rename include:

1. The template does not enable the function of a WP:shortcut, but instead produces the display of a WP:LINKBOX
2. Some editors think that listing new shortcuts in the linkbox is required for the shortcut to work
3. Due to #2 above, LINKBOXES are often excessively populated, contrary to the advice at WP:LINKBOX

In the result produced on the page, I suggest changing the heading text in the box from “Shortcuts” to “Recommended shortcut” (singular, even though multiple shortcuts may be listed). SmokeyJoe (talk) 02:15, 13 February 2025 (UTC)[reply]

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Edit request 5 June 2025

[edit]

Description of suggested change:

Diff:

line 52: line 52:
if options.target and yesno(options.target) then if options.target and yesno(options.target) then
listItems[i] = templateMode listItems[i] = templateMode
and string.format("{{%s[[%s|%s]]}}", prefix, templatePath, shortcut) and string.format("TM:{{%s[[%s|%s]]}}", prefix, templatePath, shortcut)
or string.format("[[%s]]", shortcut) or string.format("[[%s]]", shortcut)
else else
line 60: line 60:
} }
if templateMode then if templateMode then
listItems[i] = string.format("{{%s%s}}", prefix, listItems[i]) listItems[i] = string.format("TM:{{%s%s}}", prefix, listItems[i])
end end
end end

Whatback11 (talk) 17:23, 5 June 2025 (UTC)[reply]

Please provide a "complete and specific description of the request". GoldRomean (talk) 19:01, 5 June 2025 (UTC)[reply]
I think we should make it clear that the shortcut for "template:" is "tm:". Whatback11 (talk) 14:15, 11 June 2025 (UTC)[reply]
It would be useful if you could identify a page where this change would make a difference, and state what that difference would be. Johnuniq (talk) 08:38, 12 June 2025 (UTC)[reply]
The viewer can see that the shortcut for template: is tm: Whatback11 (talk) 06:52, 5 July 2025 (UTC)[reply]
I disagree with this change. I have been here for 12 years and have never seen "TM" used as a short version of the template namespace. It is definitely not needed in this template, especially outside the braces, where it makes no sense. – Jonesey95 (talk) 13:49, 10 July 2025 (UTC)[reply]
"TM:" is a shortcut for "template:". Try typing "tm:tm" in the search field and pressing Enter. Whatback11 (talk) 10:54, 8 August 2025 (UTC)[reply]
So if I read this correctly, if I were to make a link to a template, such as "TM:Color", that it would work like the other namespace "shortcuts" (aliases)? Here it is:
Well, I'll be darned. To be honest, editor Whatback11, I don't think that the "TM:" is needed in the shortcut box because the double braces are already there, and they are only used on WP to indicate templates. The TM alias isn't as well-known as WP and WT, but it's usage is for template links, not for template transclusions or substitutions. P.I. Ellsworth , ed. – welcome! – 13:12, 23 November 2025 (UTC)[reply]
Then, using Template:A as an example, instead of putting everything on one line as TM:{{A}}, how about adding a small gray note below {{A}} saying, "You can also link to it as TM:A"? Whatback11 (talk) 14:46, 23 November 2025 (UTC)[reply]
If a template-link shortcut is wanted, then a simple {{sh|TM:Shortcut}} is already available for usage, as shown to the right. Sorry, but I don't think that adding a note below the template shortcut(s) would help editors. The notes would really get hairy when there are two or more template shortcuts in the box. P.I. Ellsworth , ed. – welcome! – 16:07, 23 November 2025 (UTC)[reply]

@Whatback11:  Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. Est. 2021 (talk · contribs) 16:24, 10 July 2025 (UTC)[reply]

What can I do to reach a consensus? Whatback11 (talk) 12:17, 23 November 2025 (UTC)[reply]