Template talk:Tl
From Wikipedia, the free encyclopedia
Contents |
---|
[edit] Documentation
{{Tl}} is used to display a template name as a link. Tl stands for Template link.
[edit] Usage
{{subst:Tl|template name to display}}
[edit] Example
Code | Result |
---|---|
{{subst:Tl|tfd}} |
{{tfd}} |
[edit] See also
- - links and edit history of this template.
- - Template link, with single parameter.
- - Template link, up to three parameters.
- - Template link, ditto subst'ed.
- - see Lts discussion for more variants.
- {{tl}} / {{tlp}} for any namespace. - like
[edit] Discussion
[edit] Alphax comment
A version which takes parameters exists at Template:Template link with parameters, with a shortcut at {{tl2}}. Alphax τεχ 01:10, 30 May 2005 (UTC)
[edit] I'll have to say...
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)
[edit] Please change this template
I suggest this template to be changed to
{{[[Template:{{{1}}}|{{{1}}}]]}}
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
{{[[Template:{{{1}}}|{{lcfirst:{{{1}}}}}]]}}
- 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)
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:
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>
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)
[edit] Interwiki Link
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 --> [[fr:Modèle:M]]
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) Talk fr:Discuter Modèle:LienModèle
[edit] T1 Redirect
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)
[edit] Formatting consistency
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 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: |. -- Omniplex 08:27, 4 April 2006 (UTC)
[edit] Please add
[[fr:Modèle:M]] and [[pl:Szablon:S]]
Tomta1(10:17, 17 April 2006 (UTC))
[edit] Level 1 headings on template talk pages
Hi,
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)
- 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.
-
[edit] Purpose?
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)
[edit] Votes_for_deletion
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
- {{tl|xyz}}
- rather than
- {{[[Template:xyz|]]}}
- 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:
- <nowiki>{{</nowiki>[[Template:xyz|xyz]]}}
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)
- Not really the most are template counts. That the template only is for the word
-
-
-
- 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)
-
[edit] Add interlanguage links
Please add:
- [[az:Şablon:ŞK]]
- [[ka:თარგი:Tl]]
- [[uk:Шаблон:Tl]]
--CiaPan 19:55, 6 July 2006 (UTC)
Also [[sl:Predloga:Tl]]. Thanks. --Eleassar my talk 20:07, 6 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)
[edit] Allowing arguments
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)
[edit] interwiki addition
[[fi:Malline:Malline]] --Ppntori 22:08, 6 August 2006 (UTC)
- Done. --TheParanoidOne 22:20, 6 August 2006 (UTC)
[edit] interwiki tag needed
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)
[edit] Code tags
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)
[edit] kw
The Cornish template {{viz}} could be added to the interwiki; it's about the same. QuartierLatin1968 20:12, 4 September 2006 (UTC)
[edit] Hebrew link
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)
[edit] interwiki eo
In the noinclude section: [[eo:Ŝablono:Ŝ]]
TIA, --BACbKA 20:27, 17 December 2006 (UTC)
- Done. The interwiki links are actually located at Template:Tl/doc though. -Royalguard11(Talk·Desk·Review Me!) 04:34, 18 December 2006 (UTC)
[edit] Adding link to sister template
One may add the link to the sister template on Farsi wiki, here: fa:الگو:الگوی
- 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? --huji—TALK 19:09, 20 January 2007 (UTC)
- Thank you.
[edit] interwiki th
Please add th:แม่แบบ:Tl for interwiki links. Thanks. --23:26, 24 January 2007 (UTC)
- 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)
[edit] Interwikis pt and es
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)
[edit] Damn migrated userboxes breaking shit
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)
[edit] +it
add it:Template:Template --WISo 18:05, 18 April 2007 (UTC)
[edit] Other wikis
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 (talk • contribs) 23:35, 22 April 2007 (UTC).
[edit] nowrap?
Would anyone be opposed to adding <span style="white-space:nowrap;"></span>
to the template? — Omegatron 17:42, 18 May 2007 (UTC)
[edit] Include brackets in link
Template contents (copied from above mess):
[[{{Template:{{{1}}}|{{{1}}}}}]]
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)
[edit] Why tl*?
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|{{{2}}}}} 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)
[edit] I Have a problem
See:
{{[[Template:{{{1}}}|{{{1}}}]]}}
Why this don't work with the tempĺate ??? 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)
[edit] {{/doc}} versus {{documentation}}
{{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)
[edit] {{tlc}}, {{tld}} and {{tlf}}
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)
[edit] Free Links?
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)