Wikipedia talk:Template namespace
| This project page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
Shortcut T: for Template: ?
editIs it possible to have this, as we do with H: for Help: and others? Facts707 (talk) 08:57, 13 June 2021 (UTC)
- Facts707 we kind of do as can be seen at Category:Redirects to template namespace, but there are some problems with the practice in that they technically are in the article namespace meaning they show up in search results when they shouldn't. You can also not use them like you would expect for transcluding a template with a normal redirect in template space being better for that. --Trialpears (talk) 09:07, 13 June 2021 (UTC)
- In addition, the issue has been discussed in the past and consensus is that introducing more abbreviations would be confusing and undesirable. Use {{tl}} if appropriate, otherwise write "Template" if that is what is meant. Johnuniq (talk) 10:03, 13 June 2021 (UTC)
- This is just a side comment to John's post, but I don't understand why everyone insists on using {{tl}} when {{t}} is a character shorter and points to the same template. Also, this gets you essentially the same number of characters, as your hypothetical [[T:Example]] becomes {{t|Example}} (plus you don't need to worry about piping the "T"). Primefac (talk) 10:45, 13 June 2021 (UTC)
- These sort of redirects were effectively deprecated in in 2014 for the reasons that Trialpears has laid out. The problems could be resolved if the T: shortcuts got hard-coded into the wiki software (the way WP: and WT: are), but this seems unlikely to happen. – Uanfala (talk) 11:55, 13 June 2021 (UTC)
- There are a few redirects of this type. But T:MP is not a template, nor are T: The New York Times Style Magazine and t:kort. Except for the DYK related ones, there is very little reason to type them in and to ever use a shortcut. {{:T:ILL}} is longer than {{ill}}, so why would you want a T: shortcut that makes you type more when you transclude it? —Kusma (talk) 12:03, 13 June 2021 (UTC)
- The benefit of such a shortcut would not be in transcluding templates or in referring to them in discussions like this one, but in edit summaries and search boxes. But because T:, unlike C: and D:, is already used widely for other purposes, that's not going to happen. -- Michael Bednarek (talk) 14:04, 13 June 2021 (UTC)
- Edit summaries are the best use case. Your C: and D: links go to Commons and Wikidata. —Kusma (talk) 14:42, 13 June 2021 (UTC)
- Using the searchbox when searching for the documentation of, say, {{Wikisourcelang-inline}}, would also be simpler with T: . The point of showing those links (C:, D:) was indeed to demonstrate how some single-letter "shortcuts" have been implemented; M: and S: are others, but the train for T: has left the station. -- Michael Bednarek (talk) 03:13, 14 June 2021 (UTC)
- I don't know when the WP:ALIAS
TM:was introduced, but that solves this problem. (E.g.: TM:cn)) -- Michael Bednarek (talk) 07:19, 14 January 2025 (UTC)- Apparently in April following this discussion. Trialpears (talk) 07:36, 14 January 2025 (UTC)
- I don't know when the WP:ALIAS
- Using the searchbox when searching for the documentation of, say, {{Wikisourcelang-inline}}, would also be simpler with T: . The point of showing those links (C:, D:) was indeed to demonstrate how some single-letter "shortcuts" have been implemented; M: and S: are others, but the train for T: has left the station. -- Michael Bednarek (talk) 03:13, 14 June 2021 (UTC)
- Edit summaries are the best use case. Your C: and D: links go to Commons and Wikidata. —Kusma (talk) 14:42, 13 June 2021 (UTC)
- The benefit of such a shortcut would not be in transcluding templates or in referring to them in discussions like this one, but in edit summaries and search boxes. But because T:, unlike C: and D:, is already used widely for other purposes, that's not going to happen. -- Michael Bednarek (talk) 14:04, 13 June 2021 (UTC)
Guideline about storing text
editWP:TMPG states at the beginning, "Templates should not normally be used to store article text, as this makes it more difficult to edit the content." A recently-closed TfD at Wikipedia:Templates for discussion/Log/2022 March 31#Review aggregator prose templates keeping such a template by default indicates that this guideline is no longer applicable. Templates storing article text are created in good faith, to centralize content, in spite of the presented difficulty in editing it. If there are no examples of templates being deleted under this guideline, then the guideline should not exist any longer. It can be left to the community to determine a consensus or lack thereof to use such templates on a case-by-case basis. Editors are welcome to comment about this point. Erik (talk | contrib) (ping me) 17:56, 16 April 2022 (UTC)
- No, it indicates that in one specific case enough people who are not regularly involved with templates moaned enough that the rule wasn't enforced. If you do a search for "article text" in TfD archives, then you can see that the rule is generally enforced. One discussion that goes against an established consensus does not nullify the future applicability of that consensus in other discussions. * Pppery * it has begun... 18:01, 16 April 2022 (UTC)
- These discussions are always limited to a handful of already-involved editors, and this particular template had extraordinarily high visibility. The lack of deletion validates this kind of template in spite of the guideline. The next article text-storing template (especially in regard to film and television) can point to the preceding one on the same grounds, and so forth. There's no reason to keep a law on the books, so to speak, if it is irrelevant in the face of large-scale use across popularly-trafficked articles. The guideline simply did not apply for an ideal example that warrants it in the first place. It's time to simply remove it and let templates' existence be determined by the community for each template. Erik (talk | contrib) (ping me) 18:15, 16 April 2022 (UTC)
- No it's not time to delete common-sense rules. A few exceptions for any rule can always be found. Further, "no consensus" is hardly a ringing endorsement and the text involved is short and a good argument for consistency can be made. Johnuniq (talk) 00:25, 17 April 2022 (UTC)
- The review aggregator prose templates and others like {{Year article header}} that I don't anticipate will be challenged anytime soon indicate that there's at least some level of support for prose templates in some circumstances where text format can be highly regularized. The current guideline acknowledges that with
normally
; I might weaken that slightly, but I don't see a huge issue. {{u|Sdkb}} talk 05:37, 17 April 2022 (UTC) - I'm saying that this outcome (which defaults to keep, which is the actual outcome) sets a precedent that ultimately contradicts the guideline. This is what will happen. This high-visibility template will appear on more and more film articles (which are some of the most highly trafficked on Wikipedia) because certain editors are obsessive with proliferating shiny new features. The above editor and others like them will come up with more kinds of article text-storing templates. I can see them being empowered to create such templates for CinemaScore, Box Office Mojo, etc. where any related TFD attempted will have WP:TPMG be irrelevant because the Rotten Tomatoes template already exists. Why would any of these be truly deleted (not kept, not "no consensus") if RT survived and continued to be used? When these templates became more and more prevalent, this part of the guideline will become more and more obsolete and unquotable. It didn't apply when it was most relevant. Erik (talk | contrib) (ping me) 14:10, 17 April 2022 (UTC)
- The review aggregator prose templates and others like {{Year article header}} that I don't anticipate will be challenged anytime soon indicate that there's at least some level of support for prose templates in some circumstances where text format can be highly regularized. The current guideline acknowledges that with
- No it's not time to delete common-sense rules. A few exceptions for any rule can always be found. Further, "no consensus" is hardly a ringing endorsement and the text involved is short and a good argument for consistency can be made. Johnuniq (talk) 00:25, 17 April 2022 (UTC)
- These discussions are always limited to a handful of already-involved editors, and this particular template had extraordinarily high visibility. The lack of deletion validates this kind of template in spite of the guideline. The next article text-storing template (especially in regard to film and television) can point to the preceding one on the same grounds, and so forth. There's no reason to keep a law on the books, so to speak, if it is irrelevant in the face of large-scale use across popularly-trafficked articles. The guideline simply did not apply for an ideal example that warrants it in the first place. It's time to simply remove it and let templates' existence be determined by the community for each template. Erik (talk | contrib) (ping me) 18:15, 16 April 2022 (UTC)
Template titles
editThis page states that Template function should be clear from the template name, but redirects can be created to assist everyday use of very popular templates.
Is this still community consensus? I recently opened a RM at {{efn}}, citing that sentence. The vibe I got from that discussion was that this may not be in line with current community consensus. Is this the case? Courtesy pings for everyone who participated in the discussion: @Jonesey95, Graham, Redrose64, BarrelProof, AlphaBeta135, and Uanfala: HouseBlastertalk 20:13, 26 February 2023 (UTC)
- My opinion: Templates should follow the convention we use in every other namespace: host the page at the full title (with few exceptions, such as NATO), but have redirects from abbreviations to assist in everyday usage (e.g., WP:NPOV for Wikipedia:Neutral point of view). Just because the template has a long title does not mean that people will use the long title, and it is okay if the full title is not what people type. When was the last time you saw someone write out Wikipedia:Biographies of living persons? We can have the best of both worlds: short redirects so that wikitext is not clogged full of {{Template link with subst|Houston Texans roster navbox}}, and longer titles so that template function is intuitive from the name. HouseBlastertalk 20:13, 26 February 2023 (UTC)
- I think that the quoted passage is still the general consensus, but the linked nomination was a complex one, not a simple one. There was no consensus about the best way to rename this set of templates, so the status quo remained. If there was only one template called {{efn}}, I think the move would have been accepted with no trouble. – Jonesey95 (talk) 20:19, 26 February 2023 (UTC)
- I think that sentenacne si very reasonable still and whole dhave agreed with you in the move request. Immeedietöy seeing what the template does is important and should be generally followed. --Trialpears (talk) 20:33, 26 February 2023 (UTC)
- My comment in that prior discussion was basically supportive of that statement, although I may not have been perfectly clear about it. I said "I suspect a lot of people don't know what 'Efn' stands for." I think it is desirable to use template names that people understand. I suspect the {{efn}} template would be used more if it had a name that was easier to understand and remember. But alas, that RM is now closed, and that view did not win the day this time. — BarrelProof (talk) 21:09, 26 February 2023 (UTC)
- That bit in the guideline is applicable to the vast majority of templates, but not to all, and certainly not unconditionally. What matters most is that a template's function should be clear from its name in the wikitext where the template is used. How the title appears in other contexts (e.g. the template page where immediately following the template title the reader will see the template's documentation, or in a category listing where that template will be surrounded by other similar templates) is much less important. The crucial consideration is that in the wikitext where a template is used, there may occasionally be other factors at play. For the very small number of frequently used in-line templates (especially ones that are prone to appear several times within a single paragraph of article text), this competing factor is the need to keep the wikitext neat and readable. This leads to a preference for concise template names, even if that is at the cost of clarity. That's the reason {{sfn}} and {{efn}} are titled the way they are. Of course, my assumption here is that the tile of the template should be the form that's going to be recommended for use in wikitext (i.e. we don't have the template at one title but all its examples in the documentation using an alias); otherwise, things would be more complex, not easier for users to understand, and there would be much less point discussing the title of the template (because it wouldn't matter much after all). This is also the reason why the analogy with the WP shortcuts isn't helpful. Something like WP:V is there only as a typing aid. You're not going to see these shortcuts used in any properly written projectspace text; good practice is to write out the full
Wikipedia:Verifiability, even inside a piped link. Something like {{sfn}}, on the other hand, isn't just a typing aid, it's the form best suited for use in wikitext. You're not going to see{{shortened footnote|Smith|2009}}in any thoughtfully written piece of wikitext. However, these principles don't appear to have been applied universally (for example, {{harv}} is actually at {{Harvard citation}}), and as evident from this, and other, RMs, there is a subset of the community who disagree with them (or rather, don't seem to acknowledge they exist). – Uanfala (talk) 21:45, 26 February 2023 (UTC) - I did not participate -- probably some other user *named* Graham but with a different user name. Graham (talk) 04:55, 27 February 2023 (UTC)
- Indeed, it was Graham11 who signs themself Graham. --Redrose64 🌹 (talk) 08:36, 27 February 2023 (UTC)
- With redirects, there is no technical reason not to follow the guideline. No change to the wording of that line is necessary. Far more template discussions have closed following this guideline than have not, and those are usually due to an abundance of misunderstanding and inertia like seen in that efn RM. -- Netoholic @ 06:38, 27 February 2023 (UTC)
- Despite changing hundreds of template names over the years to follow this sentiment, there are some people are incredibly set in their ways. Maybe four years has changed the opinions of the people in this discussion but I am not going to hold my breath that people attending these sorts of RMs will actually come around to the opinion that cryptic template names are not helpful. Primefac (talk) 12:44, 6 March 2023 (UTC)
Article tables?
editTemplates should not normally be used to store article text. However, article tables (especially with detailed data) seem to be a common use for templates. See, for example, Template:Low melting point alloys and Category:Materials science templates. I'd like to propose clarifying the template guidelines with respect to stand-alone tables, please. Either permitting this particular use or making it explicit they are also discouraged. Just like any other type of article content, it's still difficult to edit content segregated in templates. (BTW, couldn't this issue be ameliorated with a standard template header/footer with View, Edit, Talk links?). If the banning of templates for article tables is ratified, should this updated guideline be pro-actively enforced on all current cases (with nominations for deletion or merging)? fgnievinski (talk) 02:06, 22 April 2023 (UTC)
Discussion at Template talk:Rotten Tomatoes prose § RfC: Should this and similar templates be substonly?
edit
You are invited to join the discussion at Template talk:Rotten Tomatoes prose § RfC: Should this and similar templates be substonly?. {{u|Sdkb}} talk 20:59, 1 December 2023 (UTC)
Advice on line breaks
editThe article says:
- "Some templates may accidentally cause extra line breaks in the rendered articles."
but it does not explain how to avoid them. I believe comments avoid line breaks. I will add this to the page. Johnjbarton (talk) 17:08, 10 October 2024 (UTC)
- The line breaks the section is referring to are at the beginning or end, for example if someone puts
<infobox code>
}}
{{main other|<tracking categories>}}
<noinclude>
- Since the tracking categories aren't actually "shown" on the page it introduces extra spaces. This can be avoided simply be not having the extra line breaks in the code. Primefac (talk) 20:27, 10 October 2024 (UTC)
- I find the issue of spaces and line breaks to be very mysterious. The discussion in the article was very disappointing. Johnjbarton (talk) 22:45, 10 October 2024 (UTC)
- If you are referring to Help:Line-break handling, then improving that page would be a discussion for its talk page. Primefac (talk) 10:02, 11 October 2024 (UTC)
- No, I actually meant in the context of templates. Previously section in this article on line breaks ended with a link Help:Line-break handling but that is not at all helpful because the linked page is not about templates. Your new version is very much better, thanks! Johnjbarton (talk) 15:38, 11 October 2024 (UTC)
- If you are referring to Help:Line-break handling, then improving that page would be a discussion for its talk page. Primefac (talk) 10:02, 11 October 2024 (UTC)
- Please update the section to explain "what this section is referring to". Johnjbarton (talk) 22:49, 10 October 2024 (UTC)
- I'll see if I can add some additional clarification. Primefac (talk) 10:02, 11 October 2024 (UTC)
- I find the issue of spaces and line breaks to be very mysterious. The discussion in the article was very disappointing. Johnjbarton (talk) 22:45, 10 October 2024 (UTC)
Template space alias
editThis has been mentioned in passing on this page; I thought it would be better seen in its own section. In case you haven't noticed yet, the template space alias is now "TM:". Just as WP:PAGENAME can be used as a shortcut for Wikipedia:PAGENAME, TM:PAGENAME is a shortcut for Template:PAGENAME. Just spreading the word. P.I. Ellsworth , ed. – welcome! – 16:09, 26 November 2025 (UTC)
Descriptive titles for sidebar and navbox templates
editTemplates like {{WWE}} and {{Socialism in Japan}} should use descriptive titles like {{WWE navbox}} and {{Socialism in Japan sidebar}}. This would make templates easier to discuss, and easier to tell apart in wikitext and in lists of templates; including in generated content like at TFD, in categories and in What-links-here lists, where context is often lacking.
Assuming consensus here, I would like to move templates, but I do not intend that we implement anything remotely resembling a mass name change or any bot actions. I personally would only intend to move pages one by one, and usually only as I edit templates in more substantive ways. Redirects would be left in place, and disruption would be at absolute minimal.
Note that there are some dual-purpose/multi-purpose templates, like {{History of England}}, which could probably just be left alone for the moment, but the goal is to eventually move away from ambiguous template names. — HTGS (talk) 05:13, 5 March 2026 (UTC)
- What would {{Socialism in Japan}} be if not a navigation template? Doesn't seem very ambiguous to me assuming you know our conventions which people discussing templates can be assumed to do. My general thoughts is that this system probably would be slightly better but that the cost of switching would simply be way too large for minimal value. Trialpears (talk) 09:19, 5 March 2026 (UTC)
- I was actually thinking more about distinguishing navboxes and sidebars from each other, but there’s a ton of them, so I doubt they’re all unambiguously navigation anyway. What do you see as the potential costs of switching?
- At worst, I figure we can encourage new templates to be titled more descriptively as they’re created. — HTGS (talk) 09:14, 6 March 2026 (UTC)
- The costs I see are tens of thousands of moves and uncertainty whether a template has the navbox/sidebar suffix or not. Lots of busy work for little value. I don't really care too much about distinguishing sidebars and navboxes tbh. Trialpears (talk) 11:43, 6 March 2026 (UTC)
- I don’t mind the busy work. I sometimes need something to do semi-mindlessly while I am preoccupied with other stuff. But also, as we know, gnomes will do gnome things if given the authority.
- But I really want to emphasize that this would not be a major project; I don’t see myself moving more than a handful of templates a month, and there would be no effort to move everything at once for the sake of such cleanup. Except where an acronym is wanted elsewhere, redirects would be left in place, and articles would not need to be edited for any renaming.
- I just want to establish that this should be the new norm, and it’s hard to make that norm apparent if we don’t lay it out clearly at WP:TPN (or wherever) and all the old templates are left named with only their
{{topic noun}}format. — HTGS (talk) 00:32, 7 March 2026 (UTC)
- The costs I see are tens of thousands of moves and uncertainty whether a template has the navbox/sidebar suffix or not. Lots of busy work for little value. I don't really care too much about distinguishing sidebars and navboxes tbh. Trialpears (talk) 11:43, 6 March 2026 (UTC)
- I fully support clear names for templates. The examples you've chosen are actually quite good! I would focus on cryptic ones like {{HSwMS}}, {{FP-H&I-D RDT}} and {{VWFL}} — Martin (MSGJ · talk) 13:50, 6 March 2026 (UTC)
- To be clear, I picked this particular focus because (a) it’s been a personal bugbear of mine, and (b) it’s a well-defined and delimited starting point that can set a good example for other templates across the board. I only bring it up here because (1) the scope of affected templates is very large, but also (2) I would like to have it written out somewhere, so ideally I can point to a consensus / guidance in my edit summaries. — HTGS (talk) 20:27, 11 March 2026 (UTC)
I’m going to make some WP:BOLD changes to WP:TPN now. Nothing crazy, but please stop me if anything seems like a mistake or a bad idea. — HTGS (talk) 20:31, 11 March 2026 (UTC)
TfD regarding template inserting article text
editEditors may wish to review and opine at Wikipedia:Templates for discussion/Log/2026 June 18#Rotten Tomatoes and Metacritic film prose. These templates are being used to insert dynamic article text into many fim articles, and it's an active discussion point as to whether that fundamentally violates the guidelines laid out for the use of templates, with some editors noting that the use of "normally" in the guideline suggests that exceptions are allowed and may be merited in this case. DonIago (talk) 14:51, 24 June 2026 (UTC)