Template talk:Template shortcut
Text has been copied to or from this page; see the list below. The source pages now serve to provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. |
Expand?
editMost useful templates have more than 3 shortcuts. Would it be all right to expand this to, say, 9? Lenoxus " * " 22:53, 23 May 2008 (UTC)
- Well, that this template only handles three shortcuts is perhaps a bit little, perhaps five just like {{shortcut}} would be a good number. The reason {{shortcut}} has not been extended to handle more links was that we don't want pages to show many shortcuts, we want people to choose the best 2-3 shortcuts for a page and show only them. I guess the same is valid for {{template shortcut}}. Or perhaps even more valid since it is confusing to find a "new" template in a page or inside another template, only to later discover that it was just yet another name for some template you already knew about. So we probably should not encourage people to use the shortcuts to a template.
- But frankly, there are better and clearer ways to show the shortcuts to a template. In spite that I am an experienced template programmer I didn't know until recently what the {{template shortcut}} boxes on template documentation pages meant. But check out the documentation for {{•}}. The third sentence there lists the shortcuts to that template in a much clearer way than a shortcut box would do.
- --David Göthberg (talk) 02:07, 24 May 2008 (UTC)
Plainlist
editPlease sync from Template:Template shortcut/sandbox, where I've created an accessible version, using HTML list markup, styled with no bullets. — Preceding unsigned comment added by Pigsonthewing (talk • contribs) 11:17, 17 January 2012
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Yes please sync from the sandbox, as requested above. The new "plainlist" functionality is present, but also now, templates are in monospace, which not only makes them larger and clearer (the current styling, identical to {{Shortcut}}, would be acceptable for WP: shortcuts in all caps but not for lowercase template code) but is appropriate for wikitext markup. — This, that, and the other (talk)
- OK, having verified at Template:Template shortcut/testcases, Done. --Redrose64 (talk) 14:14, 7 July 2012 (UTC)
No red link bug.
editIf you pass a shortcut that doesn't exist, it won't become a red link, but printed as a normal link instead. So template docs may contain wrong shortcuts. Could anyone fix? --Ahora (talk) 08:18, 27 October 2012 (UTC)
- It's not formatted as a normal link, but as an external link - the blue is subtly different (compare {{fact}} with {{fact}}). It's an external link so that the redirect is not followed. There is no easy means to detect if an external link target exists or not, so there is no redlink mechanism. --Redrose64 (talk) 14:42, 27 October 2012 (UTC)
You're right, but could it be possible to use #ifexist prior to making an external link, in order to make a red link when necessary? (It may, possibly, be better if it prints "typo?" too.) My first idea was to deliberately print an conspicuous error message if the page doesn't exist, but since this template is already in wide use, it'd be bad.
Thanks. Cheers. --Ahora (talk) 01:05, 29 October 2012 (UTC)
{{#ifexist:}}
only works on pages within English Wikipedia. It can't even check for the existence of a page on a different Wikipedia (always returning "false") - for example- so it has no chance of working for any external link. --Redrose64 (talk) 12:34, 29 October 2012 (UTC)
How about {{#ifexist| page name | external link with "noredirect" | ordinary link}}? --Ahora (talk) 23:51, 29 October 2012 (UTC)
- As in,
- That might work. --Redrose64 (talk) 08:44, 30 October 2012 (UTC)
Edit request on 2 November 2012
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Reason of the request: The current one always prints "blue links" (see the right demo), but it's inconvenient.
I ask to adopt my fix which supports red links, created in the sandbox. See this diff. It also has a slight change: it's simplified a little by replacing {{{1|{{PAGENAME}}}} with {{{1}}}. {{PAGENAME}}
is only useful for a demo in the template page itself, Template:Template shortcut, but the documentation suffices. Accordingly, the body is put inside of <includeonly>...</includeonly>
to make it look better in the template page.
A proof that it correctly works:
Thanks, dear administrator, and thanks User:Redrose64 for discussion. --Ahora (talk) 05:56, 2 November 2012 (UTC)
- Partly done: I've done it, but I tweaked it just a little so that it shows
{{PAGENAME}}
if no parameters are specified. This will look better on the template page and should keep the template from breaking if any existing transclusions haven't specified the first parameter. Good work on the code, by the way - that has been bothering me for a while. — Mr. Stradivarius (have a chat) 13:51, 2 November 2012 (UTC)
Protected edit request on 23 February 2014
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Can we change the first 0.3em
in the margin:
value to some kind of 0
? The idea is that things like this would line up:
Some template based on the {{ambox}}/{{mbox}} family, perhaps {{Documentation subpage}}. |
—SamB (talk) 19:33, 23 February 2014 (UTC)
- SamB, why does it matter if they line up or not? The reason for the 0.3 top margin as far as I know is so the shortcuts will show properly when {{Anchor}} is used to navigate to a specific section of a page. — {{U|Technical 13}} (t • e • c) 20:09, 23 February 2014 (UTC)
- @Technical 13: Well, I guess it's not too big a deal; I'm certainly less bothered by it than by what browsers do with this HTML:—SamB (talk) 00:35, 24 February 2014 (UTC)
<input type="checkbox" /><label>Foo</label>
- @Technical 13: Well, I guess it's not too big a deal; I'm certainly less bothered by it than by what browsers do with this HTML:
Protected edit request on 23 June 2014
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please update to this version of the sandbox. this will add an optional |clear=
with syntax that matches {{stack}}. by default, |clear=
and the shortcut box nests next to the prior floating object. however, if |clear=right
or |clear=left
it will clear any right/left floating elements above it, allow it to float all the way to the right/left edge of the page.
Frietjes (talk) 20:33, 23 June 2014 (UTC)
- You seem to have introduced an additional parameter called float - is this intentional? — Martin (MSGJ · talk) 20:59, 23 June 2014 (UTC)
- Not done: The page's protection level and/or your user rights have changed since this request was placed. You should now be able to edit the page yourself. If you still seem to be unable to, please reopen the request with further details. Jackmcbarn (talk) 23:25, 23 June 2014 (UTC)
"top" parameter, no colon
editThis sandbox version of the template has had the (optional) parameter top added to the table styling (primarily so that top=0 places the template flush with the beginning of e.g. a section) and the colon following "Shortcut/Shortcuts" removed (as superfluous, especially as there's nothing else in the notice other than the shortcut/shortcuts provided). If this doesn't meet with disapproval, I'll copy it to the live template a few days hence. Sardanaphalus (talk) 12:39, 29 June 2014 (UTC)
- No concerns here, although top=0 is not really standard. How about just top=no, or use {{yesno}}? — Martin (MSGJ · talk) 13:49, 30 June 2014 (UTC)
- top=0 follows the pattern at {{Template testcases notice}} – perhaps that should change too? Sardanaphalus (talk) 09:47, 4 July 2014 (UTC)
Proposed style adjustment
editRecently, {{tl]shortcut}}, {{policy shortcut}}, and {{shortcut}} had their styles adjusted; see Template_talk:Shortcut#Visual_redesign_proposal. I propose to similarly adjust this template. I've made the changes to this template's sandbox, see Template:Template shortcut/testcases for a comparison to the live template and to {{shortcut}}. - Evad37 [talk] 01:38, 23 November 2017 (UTC)
- Done - Evad37 [talk] 13:15, 28 November 2017 (UTC)
Template:* does not produce proper shortcut
editSee what happens when Template:* is used in this template? LA (T) @ 09:38, 31 January 2018 (UTC)
- @Lady Aleena: The issue here is that the MediaWiki parser won't accept an external link whose text consists solely of an asterisk which is programmatically generated (e.g.
[{{fullurl:Template:*|redirect=no}} {{#if:true|*}}]
). It doesn't appear to exhibit this behavior when the asterisk isn't programmatically generated (e.g.[{{fullurl:Template:*|redirect=no}} *]
). I've filled a bug with the development team. TheDragonFire (talk) 12:47, 10 February 2018 (UTC)
Not linking shortcuts
editThis template is designed to be placed into template documentation. By definition, a shortcut redirects to the main template, so a wikilink for a shortcut is pointless - it just takes people back to the template they're already looking at. So I suggest that the shortcuts in the displayed list of shortcuts should not be wikilinked. Colonies Chris (talk) 13:02, 4 November 2019 (UTC)
- No, it can also be used in other places (eg WP:TITLECON). Also, no harm but help in the fact that a one sees a full-name template with its—well, shortcut name. -DePiep (talk) 18:12, 4 November 2019 (UTC)
Edit request to complete TfD nomination
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Template:Template shortcut has been listed at Templates for discussion (nomination), but was protected so could not be tagged. Please add:
{{subst:tfm|help=off|type=sidebar|1=Shortcut}}
to the top of the page to complete the nomination. Thank you. JsfasdF252 (talk) 21:19, 1 February 2021 (UTC)
- Done — Martin (MSGJ · talk) 22:19, 1 February 2021 (UTC)