Template talk:Tl

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Alphax comment[edit]

A version which takes parameters exists at Template:Template link with parameters, with a shortcut at {{tl2}}. Alphax τεχ 01:10, 30 May 2005 (UTC)

I'll have to say...[edit]

This is a really good idea! — Ambush Commander(Talk) 13:54, August 6, 2005 (UTC)

Seconded. My dream template come true... —Vanderdeckenξφ 11:48, 2 August 2006 (UTC)

Please change this template[edit]

I suggest this template to be changed to


This way it won't break things if it's subst'd (& added in source here so it's displayed right) AzaToth 19:28, 27 December 2005 (UTC)

I think not it would also be better to change it to
i.e. add a lcfirst on the name so it will always shown with the first letter as lower case (As I think most people writes it when they call the template) AzaToth 17:11, 2 January 2006 (UTC)
Do they? I'd have said that the split was about 50-50. Certainly most of the templates that I call up I use a capital letter first (but then again, a lot of the templates I use start with proper nouns - specifically, country names). It's also useful to be able to have the first letter as l.c. or u.c. if the template is mentioned as the first thing in a sentence (as it quite often is at TFD, SFD, or WP:WSS). Why limit it to always rendering as lower case? Grutness...wha? 22:34, 2 January 2006 (UTC)
I'd leave it be for now. There may be a certain "suprise factor" when someone uses this and it doesn't display the uppercase as they'd expect. -- Netoholic @ 22:46, 2 January 2006 (UTC)

Right, it should not lower case, it should display exactly as the input it gets. But the {{ definitly should be changed to {{. Just as AzaToth said, that would be more robust and useful. The ending braces are not that necessary to change, but it is more robust to convert them too. So the first example above is right. Thus the first line of code in this template should be exactly this:


If you use the interwiki links to the left you will see that several of the other language Wikipedias has escaped the braces in some way too.

--David Göthberg (talk) 15:44, 27 March 2008 (UTC)

Interwiki Link[edit]

I've been looking for a while to find the matching template to the one used on the french Wikipédia for showing a template's syntax while linking to it in the form {{Template}}. It's not exactly the same but since it's used for the same purposes in about the same way, I think the following should be added to the current template :

<!-- Interwiki Link -->

Interwiki linkage of the most commonly used templates really facilitates the users' ability to adapt quickly the syntax on any local wiki... : ) Stéphane Thibault 20:50, 7 January 2006 (UTC) Nuvola apps edu languages.png Talk fr:Discuter Modèle:LienModèle

T1 Redirect[edit]

Template {{T1}} redirects to this template. Is this intentional, considering the history of T1 indicates that it's completely unrelated? --TheParanoidOne 10:42, 12 February 2006 (UTC)

Many people see tl in the monospace font presented when editing a page, and think the "L" is a "1". (I know I did at first.) --Tryforceful 17:59, 10 August 2006 (UTC)

Formatting consistency[edit]

Hi guys,

anyone taking care to make spacing consistent among Tl, Tl1, Tlx and others? If you look, for instance, at the first column in Numbers & Variables you'll see that {{ User pi digits|500 }} is the only code snippet in which additional spaces exist between the braces and their content. --Gennaro Prota 15:14, 3 April 2006 (UTC)

{{Tl}} and {{Tlp}} are protected. If a consistent look is important you could use either Template:Tlx(edit talk links history) also for one or no parameter, or only {{Tl}} (no parameter) and {{Tlp|xyz}} - then you'd glue together more parameters by a pipe symbol in numeric al form: &#124;. -- Omniplex 08:27, 4 April 2006 (UTC)

Please add[edit]

[[fr:Modèle:M]] and [[pl:Szablon:S]]

Tomta1(10:17, 17 April 2006 (UTC))

Added editprotected tracker to Tomta1's proposal: -- Omniplex 17:21, 20 April 2006 (UTC)
Done. Ashibaka tock 16:25, 22 April 2006 (UTC)

Level 1 headings on template talk pages[edit]


while thanking AzaToth for pointing me to the relevant guideline page, I would like to add a couple of thoughts: first of all "discussion pages" (or "talk pages") should be used for discussion, not for template documentation (which, as every programmer would agree, is part of the template itself). Secondly, one can (and IMHO should) put the documentation source text on the template page, between <noinclude> and </noinclude> tags. This seems even a more valid choice to me when the template page is protected (and the talk page is not). Of course, I don't expect this to proselytize, just wanted to indicate a point of view which perhaps a few others can share. --Gennaro Prota 15:38, 2 May 2006 (UTC)

Problem is, then a) users can't improve the documentation, when all we want is for them not to be able to vandalize a high-use template, and b) any changes to documentation would require every one of the (extremely many) pages that link here to have to be recached. So, I don't think it's such a good idea. —Simetrical (talk • contribs) 01:50, 5 May 2006 (UTC)
Vandalising the documentation isn't very different from vandalizing the template. This may appear a non-sense to non-programmers but code and documentation are two sides of the same coin. And both wrong code and wrong (or out-of-sync) documentation cost time. Both generate other errors and thus both decrease overall quality, which should be our ultimate goal. As to performance concerns, you shouldn't have any until there's evidence. As a rule of thumb any computer performance concern which isn't algorithmic shows bad understanding. I know you are in good faith, of course. Statements/reasonings as the one you make here simply base on vagueness their apparent plausibility, mostly on the ground that the more operations the slower the things; actually no one has an exact knowledge of how many, and what, operations are carried out and the only way to know which is faster is to measure. If you have friends who are professional programmers you may ask them. Really. (But I know you won't believe me) --Gennaro Prota(talk) 00:51, 6 May 2006 (UTC)
Protecting the documentation is different from protecting the template, for two reasons. First of all, the documentation can probably always be improved; it's hard to see how the template could be improved from here. Second of all, the damage from high-use templates' vandalism is absolutely greater than the damage from documentation's vandalism, because the former vandalism shows up on thousands of pages whereas the latter shows up on only one.

As for template load, I don't know the specifics, you're correct. I do know that editing very high-use templates (such as, formerly, {{qif}}) can cause database locks of a few seconds, according to a notice on Template talk:Qif that was presumably put up by someone who tried it. If you would like to ask the paid MediaWiki developers on Wikipedia:Village pump (technical) whether we should gratuitously cause at least several tens of thousands of database queries every time we want to update documentation for this template, I'm sure they'd be happy to answer you. —Simetrical (talk • contribs) 04:24, 7 May 2006 (UTC)


Is this necessary? It is possible to link to a template by typing [[Template:templatename]], such as Template:Tl. If one doesn't want "Template:" to appear, piping would produce Tl. Ardric47 05:22, 18 May 2006 (UTC)

That depends on how you see it. {{tl|template}} results in {{template}}, includeing the brackets that will easy copy and paste of template code. So yes I think it's necessary. AzaToth 12:55, 18 May 2006 (UTC)
Ok, that makes sense. Ardric47 23:30, 18 May 2006 (UTC)


This Template is (now) obsolete.(?) You can write {{[[Template:xyz|]]}}. (I don't know since when, I think already always) In de:Vorlage:Vl it's proposed for deletion. The only aid is to have not to write Template:. But we thanks for the good Wikipedia servers. —Olliminatore 21:59, 6 June 2006 (UTC)

by the same argument all redirects are obsolete. On some pages (such as lists of templates) typing
rather than
a few hundred times reduces the coding by an enormous amount. I wouldn't be in favour of deletion of this template for that reason. Let's face it, it no more increases the need for deletion than before, when we could quite happily have typed:

Grutness...wha? 00:25, 7 June 2006 (UTC)

Okay not deletion but declaration as obsolet (or deprecated)? I wanted some (pro) arguments for the de:delete diskussion (still on the go). I recognize also now, the amount of includings of this Template is not be reversibly. The amount of code reduces is an argument, but I'm not sure that can protect it in de:. —Olliminatore 11:00, 7 June 2006 (UTC)
It's used because some people find it more convenient, that's all. There's not really much to argue about, except that people who suggest that it should be killed for server-load reasons should be smacked, because they invariably have no idea what they're talking about. (For the record, I asked at WP:VPT, and brion—one of Wikimedia's two paid developers—only responded to say that people who used the template were lazy asses, ignoring the question of server load, so I figure that means it's hardly a big issue. This is given that there are 70,000+ transclusions on the English Wikipedia and rapidly increasing.) —Simetrical (talk • contribs) 21:38, 7 June 2006 (UTC)
The biggest server problem is when a heavily used template is changed. If {{tl}} is used on 70,000 pages and someone alters the code for it, then that would do nasty things to the servers. Grutness...wha? 07:05, 8 June 2006 (UTC)
Not really the most are template counts. That the template only is for the word Template that is true nasty. (We can make for many words templates, so we have code reduction! *jeha*) @redirect: is an complete other thing for the server. --Olliminatore 17:15, 8 June 2006 (UTC)
Ack, I missed these comments. Anyway, modifying it wouldn't do nasty things to the servers, just a touch of slowness for a while at worst. Possibly too little to be noticeable, possibly not, but don't worry about it. —Simetrical (talk • contribs) 05:11, 7 July 2006 (UTC)

Add interlanguage links[edit]

Please add:


--CiaPan 19:55, 6 July 2006 (UTC)

Also [[sl:Predloga:Tl]]. Thanks. --Eleassar my talk 20:07, 6 July 2006 (UTC)

As you were. Ashibaka tock 06:21, 7 July 2006 (UTC)

Please add zh:Template:Tl also.--Hello World! 16:28, 4 August 2006 (UTC)

Done. --TheParanoidOne 21:39, 4 August 2006 (UTC)

Allowing arguments[edit]

I've modified the template, so now (for instance) {{prod}} works. It's a feature I've long wanted. :) Mangojuicetalk 17:11, 24 July 2006 (UTC)

Reverted myself. This works, but it makes a nasty bunch of code when substed. Mangojuicetalk 17:22, 24 July 2006 (UTC)
Vote for Mediazilla:2777. —Simetrical (talk • contribs) 20:47, 24 July 2006 (UTC)
It'd be really nice if this could be implemented cleanly. Can't you just print every arg after the first with relative ease? MrZaiustalk 03:51, 29 August 2007 (UTC)

interwiki addition[edit]

[[fi:Malline:Malline]] --Ppntori 22:08, 6 August 2006 (UTC)

Done. --TheParanoidOne 22:20, 6 August 2006 (UTC)

interwiki tag needed[edit]

Please add the template {{commonstmp}} with no perameters after the noinclude block begins. Thanks // FrankB 04:43, 19 August 2006 (UTC)

That has to be protected first, if this is done. —Simetrical (talk • contribs) 03:25, 20 August 2006 (UTC)
I moved the noinclude section to a Template:Tl/doc sub-page, added the 'commonstmp' template and the documentation, and transcluded it onto the main template page. This greatly reduces the transcluded size of this template while also allowing documentation and interwiki updates to be made by any user without impacting the cache of pages calling this template. --CBD 11:38, 20 August 2006 (UTC)

Code tags[edit]

Shouldn't this have <code> tags inside it? When referring to a template with this template, you are usually referring to how it is typed:

  • "add {{unsigned}} after a comment left by an anon"

Omegatron 14:16, 26 August 2006 (UTC)


The Cornish template {{viz}} could be added to the interwiki; it's about the same. QuartierLatin1968 El bien mas preciado es la libertad 20:12, 4 September 2006 (UTC)

Yes check.svg Done. --  Netsnipe  ►  16:09, 5 September 2006 (UTC)

Hebrew link[edit]

Since you've locked the template, the Hebrew link is [[he:תבנית:תב]]
Best regards, Yuval Y 14:32, 21 September 2006 (UTC)

It can be added by anyone to Template:Tl/doc, which is not protected. —Simetrical (talk • contribs) 20:09, 22 September 2006 (UTC)
So I've noticed, and added a link. And removed it, since it was doubled... =) Yuval Y 02:12, 23 September 2006 (UTC)

interwiki eo[edit]

In the noinclude section: [[eo:Ŝablono:Ŝ]]

TIA, --BACbKA 20:27, 17 December 2006 (UTC)

Yes check.svg Done. The interwiki links are actually located at Template:Tl/doc though. -Royalguard11(Talk·Desk·Review Me!) 04:34, 18 December 2006 (UTC)

Adding link to sister template[edit]

One may add the link to the sister template on Farsi wiki, here: fa:الگو:الگوی

Yes check.svg Done. See section immediately above this, though -- the interwikis are on a non-protected subpage. ;) Luna Santin 21:43, 19 January 2007 (UTC)
Thank you. I don't understand your final sentence though, since the page you linked is above sister projects rather than interwiki links, or I'm misunderstanding it. What I don't understand is, how is it that the interwiki links are added to TI/doc article, but don't appear to the left of it.. they rather appear on the left of the main article. Is this always like that?
By the way did you have to install Farsi support on your OS to paste the link I provided? --hujiTALK 19:09, 20 January 2007 (UTC)

interwiki th[edit]

Please add th:แม่แบบ:Tl for interwiki links. Thanks. --23:26, 24 January 2007 (UTC)

Yes check.svg Done, but once again see the sections above, interwiki links for the template are located at Template:Tl/doc, which is not protected and can be edited by anyone. --bainer (talk) 00:14, 25 January 2007 (UTC)
Thanks. Sometimes I didnot notice since some locked templates do not have /doc page. Anyway thanks for reminding me. I will keep closer eyes on them --Jutiphan | Talk - 00:48, 25 January 2007 (UTC)

Interwikis pt and es[edit]

Add [[pt:Predefinição:Link para predefinição]] and [[es:Plantilla:Template link]] too. Thanks!! --Thiago90ap 07:08, 3 February 2007 (UTC)

Ops.. sorry, now I saw the section above ^^

--Thiago90ap 07:11, 3 February 2007 (UTC)

Damn migrated userboxes breaking shit[edit]

How can I call this template for a template that exists in the user namespace? I used to use {{template|User ATHF}}, but now that it's at User:UBX/ATHF, a call to {{template|User:UBX/ATHF}} doesn't work: {{User:UBX/ATHF}} :: ZJH (T C E) 23:28, 7 March 2007 (UTC)

I see that {{tlu}} is the answer. :: ZJH (T C E) 23:33, 7 March 2007 (UTC)
Would a check with {{#ifexist:}} to determine which to use make sense? For example:
--Kimontalk 22:20, 22 April 2007 (UTC)


add it:Template:Template --WISo 18:05, 18 April 2007 (UTC)

Other wikis[edit]

Why isn't this in a mediawiki namespace?

I just spent 10 minutes trying to use this on http://fr.wikipedia.org/ (would be the same for http://en.wiktionary.org/ I expect), and couldn't. I just found out the name was different on other wikis. This should be bundled with mediawiki. —The preceding unsigned comment was added by Argav (talkcontribs) 23:35, 22 April 2007 (UTC).


Would anyone be opposed to adding <span style="white-space:nowrap;"></span> to the template? — Omegatron 17:42, 18 May 2007 (UTC)

Include brackets in link[edit]

Template contents (copied from above mess):


This makes it display like {{template}}, which looks cleaner than {{template}}. To me anyways. Zojj 22:34, 10 July 2007 (UTC)

Nah, I think that's worse, TBH. Keep it like it is. —Vanderdeckenξφ 18:14, 11 July 2007 (UTC)

Why tl*?[edit]

Why does {{tl2}} exist? I don't understand how there is any benefit whatsoever to having that be a separate template. Why on earth can't we just print what tl prints when there are no additional args in tl2 and move that here? Same applies to {{tlx}}, {{tlp}} et al. Why not merge them into one template? The code wouldn't be that complex, as demonstrated by Template:tl2. Note that it might involve just a touch more work to merge in tlp, as evidenced by the glitch above. MrZaiustalk 16:56, 14 September 2007 (UTC)

Well, first of all {{tl}} and {{tl2}} doesn't look the same. Some of us prefer the normal text style that {{tl}} uses instead of the wider text style that {{tl2}} uses. And for short template names like {{·}} many of us prefer to use the {{tn}}.
Secondly some think that it is good to have a simple template that does not add much to the page code when used many times. Although I don't think that is that much of a problem. We don't use these templates that many times on one page. Not like the {{·}} etc that are sometimes used a zillion times on a single page. So sure, some of these templates could perhaps be merged.
But on the other hand, what is the problem with having choices? Try them out and decide which you like and stick to them. You don't have to bother about all the other.
--David Göthberg (talk) 16:09, 27 March 2008 (UTC)

I Have a problem[edit]



Why this don't work with the tempĺate Face-smile.svg??? Heldergeovane 18:41, 12 October 2007 (UTC)

Because '=' is part of the syntax for entering template arguments, I assume. {{tl|1==)}} works : {{=)}}. Algebraist 17:22, 21 October 2007 (UTC)
Thanks! Heldergeovane (talk) 19:00, 26 November 2007 (UTC)

{{/doc}} versus {{documentation}}[edit]

{{editprotected}} Please change {{/doc}} to {{documentation}} (or its redirects like {{template doc}}, etc.) instead. --Geopgeop (T) 03:13, 20 February 2008 (UTC)

This template is very heavily used, and this seems like a minor cosmetic change. It would be fine to make this change as part of another edit, but why is it worth doing on its own? Gimmetrow 06:19, 20 February 2008 (UTC)
Yes check.svg Done, makes the page more uniform with all the others.

{{tlc}}, {{tld}} and {{tlf}}[edit]

When I was documentation some templates I realised that {{tl}} and the other similar templates have one drawback: They are so simple to use that one tends to use them for all mentioning of the templates in the text and that causes a sea of blue repetitive links, and that is pretty distracting. In good Wikipedia tradition an item should only be linked on first occurrence (and perhaps occasionally somewhere further down too). So I created these three templates:

  • {{tlc}} – Looks like this: {{name|parameters}}
  • {{tld}} – Looks like this: {{name|parameters}}
  • {{tlf}} – Looks like this: {{name|parameters}}

So now it is easy to state template names without linking them. And since the names are similar to {{tl}} it is easy to change back and forth between linked and non-linked.

{{tlc}}, {{tld}} and {{tlf}} can take several parameters. And they have a functionality that I think is brand new: They understand and correctly show empty parameters!

--David Göthberg (talk) 16:30, 27 March 2008 (UTC)

Free Links?[edit]

What about free links? There seems to be some problems with the usage of {{tltts}} in the Wikipedia:UTM article. (see {{w-link}} on that page) --Danorton 02:49, 8 May 2008 (UTC)

Strange things happening with Tl[edit]

Hi - strange things seem to be happening with Template:Tl - have a look at this edit - it seems to have simply put the text of the template onto the page. This started happening yesterday, and I can't see any reason for it. Any clues? Grutness...wha? 02:07, 10 July 2008 (UTC)

  • Looks like a bug in the MediaWiki software. I did some basic tests (see User:CapitalR/Test) and was able to easily reproduce the problem. It does not show up when previewing an edit; only when the page has been saved does it appear. I recommend submitting a bug report (I just don't have time now to do it, but I will mention this at the Village pump). --CapitalR (talk) 02:36, 10 July 2008 (UTC)


I think it would be a good idea to {{nowrap}} this. Headbomb {ταλκκοντριβς – WP Physics} 03:52, 17 February 2009 (UTC)

I agree, that would be an improvement.
I added the nowrap feature to {{tlc}}, {{tld}} and {{tlf}} when I created them last year. And no one has complained about it so far. Since nowrap "just works" I think most haven't even noticed that they have the feature.
And for reasons of robustness and efficiency I think we should hard code the nowrap span into the template, just like I did with {{tlc}} etc, instead of calling the {{nowrap}} template.
--David Göthberg (talk) 01:10, 18 February 2009 (UTC)

I am planning to update ((tlp))[edit]

I am planning to make the {{tlp}} template work like {{tlf}}. (But with a linked template name of course.) I am announcing this here since I think more people watch this page than the {{tlp}} page. Se full explanation and discuss this over at Template talk:Tlp#Make this one work like ((tlf)).

--David Göthberg (talk) 08:00, 18 February 2009 (UTC)

Multiple parameter support[edit]

An administrator should take a look at Template:Tl/testcases and User:IRP/Sandbox/TlTest. You should be able to see what I'm trying to do. One might want to add {{Template:Template|parameter 1}} to a page. I tried to design it to support up to 4 parameters, however, it only supports 3. Please correct any coding mistakes I made. -- IRP 01:21, 1 April 2009 (UTC)

Ah, nice code. The reason your version only works for 3 "parameters" is that you are forgetting that the template name is the first parameter, thus you only have 3 more in your code.
But you might want to take a look at {{tlp}} and {{tlx}}, they already can handle several parameters. And they have some other bells and whistles too.
--David Göthberg (talk) 03:29, 1 April 2009 (UTC)

Editprotected request involving this template[edit]

This message is to inform people monitoring this talk page that there is an "editprotected" request involving this and several other templates at Template talk:! cymru.lass (hit me up)(background check) 20:36, 28 December 2010 (UTC)

Date option?[edit]

Given the number of templates that want a |date=CURRENTMONTH parameter, could we get an option that adds that automagically, instead of making me figure out the kludge for displaying that? WhatamIdoing (talk) 16:42, 2 June 2011 (UTC)

The name[edit]

Hello! Please tell me about its name, tl. I want to translate it on Punjabi wiki but for that please tell me what tl stands for? Please try to explain as much as you can and in simple English. Tari Buttar (talk) 04:59, 6 August 2012 (UTC)

Tl is template link.

You Type:
Page displays:
This is an example of a template.
For help with templates, see Help:Template.

You Type:
Page displays:

--Guy Macon (talk) 05:37, 6 August 2012 (UTC)

Major reorganization of template linking templates[edit]

Hi all, since I'm of the opinion the current naming scheme for template linking templates is very unclear and hard to remember I'm proposing a major reorganization of template names to unify and standardize them and simplify usage. I'm suggesting a naming scheme using single letters to describe appearance:

  • text style: normal=""; teletype = "t", bold = "b"; italic = "i", code = "c"
    Combinations can be considered (either by choosing a fixed, maybe alphabetical, order or by defining multiple names, e.g. "bt" or "tb" for bold teletype font).
  • Linkification: "tl" for normal linked template, "tnl" for non-linked template
  • Variations: "tls" for addition of subst:, "tl2" for braces inside link, "tla" for alternative link text

The overview template {{Tl-nav}} with my proposed changes will then look like

Link style Linked Unlinked Linked with subst Linked including braces Linked with alternative text
Text style {{tlg}} option nolink=yes subst=yes braceinside=yes alttext=FOO
Normal {{tl}} {{tnl}} {{tls}} {{tl2}} {{tla}}
Teletype tt=yes {{tlt}} {{tnlt}} {{tlst}} {{tl2t}} {{tlat}}
Bold bold=yes {{tlb}} {{tnlb}} {{tlsb}} {{tl2b}} {{tlab}}
Italic italic=yes|tt=yes {{tli}} {{tnli}} {{tlsi}} {{tl2i}} {{tlai}}
Code code=yes {{tlc}} {{tnlc}} {{tlsc}} {{tl2c}} {{tlac}}

For comparison the current overview looks like

Link style Linked Unlinked Linked with subst Linked including braces Linked with alternative text
Text style {{tlg}} option nolink=yes subst=yes braceinside=yes alttext=FOO
Normal {{tl}} · {{tlp}} · {{tlg}} {{tlf}} {{tls}} · {{tlsp}} {{tn}} {{tla}}
Teletype tt=yes {{tlx}} {{tld}} · {{tnull}} {{tlxs}}
Bold bold=yes {{tlb}}
Bold teletype bold=yes|tt=yes {{tlxb}}
Italic teletype italic=yes|tt=yes {{tlxi}}
Code code=yes {{tlc}}

Furthermore i propose that all versions should take and display parameters (I don't see a reason why they should be omitted anyway) so no special versions are needed anymore (most templates already accept parameters now). Probably the best approach would be to use {{tlg}} as the generalized base and use it in all other templates by only specifying the needed parameters. We'll be able to manage all template linking templates from one central place then.

Please tell me what you think and if there could arise any problems. In my personal opinion it would be very helpful to actually have systematic and meaningful names so one always nows what the specific template does even without reading it's documentation and can remember it very easily. -- Patrick87 (talk) 23:59, 12 April 2013 (UTC)

  • Oops. Looks like it had changed somewhat in the last 20 days from the static copy above, and before I saw this discussion, I just made a few more changes hoping to improve usability. Below is a transcluded version that will stay "current" as it is discussed further. I'll post comments specific to the proposal below. Thanks, Grollτech (talk) 16:32, 2 May 2013 (UTC)

General-purpose formatting[edit]

  • 1 {{tlg}} is the most general, allowing any combination of text style and/or link style options.
  • 2 Prevents wrapping of text by placing it inside <span class="nowrap">...</span> tags.
  • 3 Uses monospace font but not <code>...</code>.
  • 4 Allows links to templates in any namespace.

Other formatting templates[edit]

Code example Effect Notes
{{tl2|Hatnote|lang=fr}} {{hatnote}} Supports linking to sister projects (e.g., fr:Hatnote)
{{tlu|User:Ahunt/SSHFS}} {{User:Ahunt/SSHFS}} Supports linking to any namespace
{{xpd|Hatnote|Some hatnote text}} "{{hatnote|Some hatnote text}}" gives "
Some hatnote text
" [1]
Shows code, example and a link to expand the template code

With utility links[edit]

Code example Effect
{{lts|Hatnote}} Template:Hatnote(edit talk links history)
{{t links|Hatnote}} Hatnote (edit · talk · history · links · /subpages · /doc · /doc edit · /sbox · /sbox diff · /test · Module:hatnote)
{{tfd links|Hatnote}}
Template:Hatnote (edit · talk · history · links · logs · delete)
{{tiw|Hatnote}} Template:hatnote (backlinks edit)
{{tltt|Hatnote}} {{Hatnote}}
{{tetl|Hatnote}} {{ Hatnote }}
links talk view
{{tsetl|Hatnote}} {{ subst:Hatnote }}
 links talk view
{{ti|Hatnote}} Template:Hatnote (talk · links · edit)
{{tic|Hatnote}} Template:Hatnote (talk links edit)
{{tiw|Hatnote}} Template:Hatnote (backlinks edit)
{{tlt|Hatnote}} {{Hatnote}} (talk)
{{ttl|Hatnote}} {{Hatnote}} (t/l)
{{twlh|Hatnote}} Template:Hatnote (links, talk)

Discussion regarding reorganization of template linking templates[edit]

For your convenience use this section for discussion. -- Patrick87 (talk) 23:59, 12 April 2013 (UTC)

  • I don't think there is any need to continue promoting the "teletype" variants as a group separate from the "code" variants, because AFAIK, all of these were altered internally to use <code>...</code> instead of <tt>...</tt> some time ago, when we knew that MediaWiki would switch over to HTML5, where the TT element has been marked as obsolete. I have (belatedly) amended the documentation. --Redrose64 (talk) 07:15, 13 April 2013 (UTC)
  • You're right, actually I think <code> and <tt> are redundant most of the time. However I think it would be nice to still offer the possibility of monospaced font (which can be achieved in HTML5 without using the deprecated <tt> tag) since it looks different from <code> tags (no background).
    In my personal opinion we could even change to only have template linking templates with <code> tags in linked and unlinked forms. This would be the best simplification after all but I doubt this will find any consent. Therefore I'm aiming to have a clear list at least. -- Patrick87 (talk) 12:32, 13 April 2013 (UTC)
I prefer to use the monospaced forms when explaining how to use templates (e.g. at WP:VPT), because the different typeface is an indication as to what the user should actually type in order to achieve the desired effect, as opposed to the explanatory text. Within Wikipedia, the primary difference in appearance between <code>...</code> and <tt>...</tt> is in the background to the enclosed text.
Markup Renders as
<code>This uses the unstyled code element</code> 
This uses the unstyled code element
<tt>This uses the unstyled tt element</tt> 
This uses the unstyled tt element
It is possible to make the code element look like the tt element by the use of a little CSS:
Markup Renders as
<code style="background:inherit;">styled to inherit the background</code> 
styled to inherit the background
<code style="background:none;">styled to have no background</code> 
styled to have no background
<code style="background:transparent;">styled with a transparent background</code> 
styled with a transparent background
To me, those three all look like the <tt>...</tt> example. --Redrose64 (talk) 18:15, 13 April 2013 (UTC)
Yes, looks fine. I'd have come up with
Markup Renders as
<span style="font-family:monospace,monospace;">simple monospaced font</span> 
simple monospaced font
The double specification of "monospace" is necessary to work around a Firefox bug (font renders smaller otherwise). So can we already agree to keep the "teletype" style? -- Patrick87 (talk) 19:26, 13 April 2013 (UTC)
  • Is there an established need to create all the "missing" variants? I don't see one: on the rare occasions that I do need one for which no template exists, I use {{tlg}}. --Redrose64 (talk) 07:15, 13 April 2013 (UTC)
  • Not all but some may be worth a thought. I only specified all of them for the sake of completeness, if they are all necessary is a different question that could be discussed if my proposal is accepted. -- Patrick87 (talk) 12:32, 13 April 2013 (UTC)
  • Is there any need to change existing names? This can only lead to confusion. --Redrose64 (talk) 07:15, 13 April 2013 (UTC)
  • For me there definitely is. Since I can't remember any of the current names (there doesn't seem to be any obvious system behind them) I'm always using simply {{t}} which links to {{tl}} and produces a flood of blue links where often (need to switch to the overview template right now to find the right one) {{tlf}} would be enough or (switching again) {{tld}} or even {{tlc}} would be even better. -- Patrick87 (talk) 12:32, 13 April 2013 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── I have a couple of thoughts:

  1. with respect to the deprecated <tt>...</tt>: this morning I noticed that {{tld}} and {{tlsd}} still use that tag – so I removed the former from the Navbox. It would likely be more appropriate to simply redirect them to {{tlc}} and {{tlsc}}, respectively.
  2. While many editors can never remember the jumble of names for these templates, I'm sure there are also many editors who do remember them – not to mention the tens of thousands of pages that use them. I assume, therefore, that the intent is to maintain 100% backwards compatibility through redirects, and to merely changed the "advertised" function names? That would be imperative, IMHO.
  3. As to the "missing" templates, I can only foresee a small handful (certainly < 5) of them ever being necessary. if someone ever needs a "one-off", they can use {{tlg}}. Having said that, I'd rather look at grey squares (perhaps lighter I made them) than a sea of red links that distract the eye from the goal.
  4. There are a whole mess of oddballs that aren't in the navbox at all, like {{tlu}} (equiv. to {{tlg||anypage=yes}}, for namespaces other than [[Template:]], yet it's syntactically flawed in that it displays the wrong flavor brackets). As alluded to earlier, there's {{tlsc}} and {{tlsf}} (|nolink=yes, |subst=yes), and about twenty other "tl-du-jour" flavors... I think we have enough.

Grollτech (talk) 19:26, 2 May 2013 (UTC)

Yes I'm thinking a little different on my proposal, too, nowadays. When I first proposed the changes I was aiming to provide all of the already available template linking templates. Now I think it would be best to cut them down to a minimum (I'm not talking about deleting but redirecting were appropriate and leaving unnecessary templates out of the nav box). To make a start here are some basic proposals, what probably should be done:
  • Get rid of (redirect) duplicate template styles where the only difference is that one version accepts parameters while the other one does not. I think we can always accept parameters or is there any case were one deliberately wants to omit specified parameters?
  • Get rid of (redirect) duplicate template styles where the only difference is that one version allows page breaks while the other one forbids them. I'm open for suggestions on which behavior to prefer, actually I think it doesn't really matter (and therefore having both versions is nonsense)
  • Use {{tlg}} in existing templates wherever possible. That means instead of duplicating code for every template just use {{tlg}} as a core template and only feed it with the necessary parameters. This makes code changes much easier since only one single template needs to be changed instead of applying changes to all templates individually (as it was necessary when replacing <tt> with <code> tags).

Tell me what you think, and if there are any objections on these three tasks. Otherwise I might start working on these. --Patrick87 (talk) 20:34, 2 May 2013 (UTC)

The <tt>...</tt> tag is not deprecated, but is obsolete. The difference is that "deprecated" means "don't use this in new code although it will still work for the time being" whereas "obsolete" means "you should amend existing uses because its support is no longer guaranteed".
{{tld}} hasn't used <tt>...</tt> for seven months. I guess that {{tlsd}} was overlooked when we went through the suite last year; for consistency I've now amended it in a similar manner. {{tlc}} cannot (yet) be used as a direct replacement for {{tld}} unless the | parameter is added to the former.
{{tlu}} doesn't "display the wrong flavor brackets"; it displays the correct form, since it is intended for demonstrating the ytansclusion of pages outside template space which are to be used as if they were templates. --Redrose64 (talk) 22:10, 2 May 2013 (UTC)
  • This is the major change needed: for each template, show which links it produces. Explaining styles like bolding is useless in the overview (they could be on the idndividual documentation). -DePiep (talk) 11:18, 17 April 2014 (UTC)

Relevant RfD[edit]

An RfD is being held that may affect templates similar to this one: See Wikipedia:Redirects for discussion/Log/2014 February 15#Template:Cop. —/Mendaliv//Δ's/ 02:12, 16 February 2014 (UTC)

Proposed changes[edit]

See ‎sandbox and test cases.

  1. HTML entities for the { and } s. per #Please change this template
  2. Code tags per #Code tags
  3. nowrap span per #nowrap? and #Nowrap
  4. if a template does not exist, does not create a link, and strikes through from stem to stern.

All the best: Rich Farmbrough10:29, 6 May 2014 (UTC).

Implement the sandbox, per the above proposal. All the best: Rich Farmbrough20:54, 24 August 2014 (UTC).
Hi, I totally support your changes!
Only exception is point 4. – I'd keep out that additional {{#ifexist:}} check and just put the Redlink there. This is the only consistent behavior (if I put an invalid Wikilink it's turned into a Redlink too, instead of being struck out), often what one wants (e.g. to propose a new template and give others a direct link to the yet to be created page) and by far less expensive for the parser (it would be totally excessive if we used expensive parser functions in supposedly simple formatting templates as {{tl}}). --Patrick87 (talk) 01:03, 25 August 2014 (UTC)
Red information icon with gradient background.svg Not done: I agree, let's not go using expensive parser functions in what is supposed to be a simple formatting template. Anomie 01:30, 25 August 2014 (UTC)
I agree that using #ifexist is a bad idea here, and I think that people would object if the display of this template was changed. I do think that switching to HTML entities is a good idea, though. I doubt there is much real performance difference, but it seems odd to use literal curly braces as if we were trying to transclude the template link instead of just displaying it. How about something like this instead? — Mr. Stradivarius ♪ talk ♪ 02:38, 25 August 2014 (UTC)
Yes check.svg Done That part seems sane. Anomie 10:26, 25 August 2014 (UTC)

A question (I cannot find in /doc)[edit]

Hi. I am using {{tl}} dozens of times a week, happily. But from the /doc, I still cannot read how to achieve output looking like

{{Track gauge}} or {{Track gauge}}

I expect that to be in the /doc. -DePiep (talk) 19:37, 27 September 2014 (UTC)

@DePiep: Try {{tlx}} --Redrose64 (talk) 21:33, 27 September 2014 (UTC)
Point is: should be in the doc. -DePiep (talk) 22:06, 27 September 2014 (UTC)
It is in the doc, in the box at General-purpose formatting, row "Code", column "Linked". --Redrose64 (talk) 22:31, 27 September 2014 (UTC)
It is in the column "linked". I am looking for the unlinked outcome. But after some research, I found one. -DePiep (talk) 12:25, 28 September 2014 (UTC)

I've been working, on and off, on revising how links to template-linking and template-syntax templates are supplied. I'll try to produce a result / some suggestions. Sardanaphalus (talk) 12:13, 28 September 2014 (UTC)