Difference between revisions of "Template:Tdeprecated"
m (1 revision) |
m (1 revision) |
||
Line 1: | Line 1: | ||
{{ Template | {{mbox | ||
| demospace = {{{demospace|}}} | |||
| type = style | |||
| image = [[Image:Symbol opinion vote.svg|40px]] | |||
| text = | |||
{{#if:{{{new|{{{2|}}} }}} | |||
| <!-- New usage (with or without date) | |||
-->The template {{[[Template:{{{1}}}|{{{1}}}]]}} is deprecated. Please use {{{new|{{[[Template:{{{2}}}|{{{2}}}]]{{#if:{{{3|}}} | |||
| <nowiki>|</nowiki>{{{3}}} | |||
}}}} }}} instead. | |||
| <!-- Old usage (deprecated, being switched) | |||
-->The template {{[[Template:{{PAGENAME}}|{{PAGENAME}}]]}} is [[:Category:Deprecated templates|deprecated]]. Please use {{{use|{{[[Template:{{{1}}}|{{{1}}}]]}}}}} instead. <br> <small>This usage is deprecated. Please replace it with <nowiki>{{tdeprecated|</nowiki>{{PAGENAME}}<nowiki>|</nowiki>{{{1}}}<nowiki>}}</nowiki>.</small> <includeonly>{{{category|[[Category:Deprecated use of tdeprecated]]}}}</includeonly> | |||
}} | |||
}}<includeonly>{{{category|{{#ifeq:{{ARTICLESPACE}}|Template | |||
| {{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}<!--Don't categorise /doc pages --> | |||
|{{#if:{{{date|}}} | |||
| [[Category:Templates deprecated since {{{date}}}|{{PAGENAME}}]] | |||
| [[Category:Deprecated templates|{{PAGENAME}}]] | |||
}} | |||
}} | |||
| [[Category:Pages using deprecated templates]] | |||
}} }}}</includeonly><noinclude> | |||
{{documentation}} | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | |||
</noinclude> | |||
{{ | |||
<!-- | |||
Latest revision as of 15:00, 3 February 2009
The template {{Tdeprecated}} is deprecated. Please use {{[[Template:{{{1}}}|{{{1}}}]]}} instead. This usage is deprecated. Please replace it with {{tdeprecated|Tdeprecated|{{{1}}}}}. |
This template has a sandbox (edit) and testcases (edit) for editors to experiment.
This is the {{tdeprecated}} template.
Note: This template itself is not deprecated. However using it with only one parameter is deprecated, it now takes 2-3 parameters instead. In the display above it gets no parameters, that's why the small text says: "This usage is deprecated."
{{deprecated template}} redirects here and can be used as an alternative name for this template.
This template notifies users that a given template has been replaced by a different one. This is useful when usage is different (so a redirect won't work) or you'd like to reduce the number of redirects (which makes bot parsing more difficult).
Whenever possible, it should replace the deprecated template's content entirely, so that someone using the template will see the message.
Usage
{{tdeprecated|old template name|new template name}}
{{tdeprecated|old template name|new template name|date=June 2024}}
Normal usage
Normal usage categorises templates to Category:Deprecated templates.
{{tdeprecated|old|new}} {{tdeprecated|old|new|parameter}} {{tdeprecated|old|new|<nowiki>parameter|fuu</nowiki>}}
The template {{old}} is deprecated. Please use {{new}} instead. |
The template {{old}} is deprecated. Please use {{new|parameter}} instead. |
The template {{old}} is deprecated. Please use {{new|parameter|fuu}} instead. |
With a date
Adding the 'date' parameter subcategorises the template to Category:Templates deprecated since June 2024.
The template {{old}} is deprecated. Please use {{new}} instead. |
Technical details
This template changes style depending on what kind of page it is show on. Thus it adheres to the standardised looks for the different pages. For instance if this template becomes visible in an article it looks like this:
The template {{old}} is deprecated. Please use {{new}} instead. |
See also
- {{sdeprecated}} – For deprecated shortcuts.
- Category:Deprecated templates – The category where this template lists templates it is used on.
de:Vorlage:Veraltete Vorlage es:Plantilla:Plantilla en desuso hsb:Předłoha:Zestarjena předłoha it:Template:Template obsoleto ka:თარგი:თმოძველდა ja:Template:移行中のテンプレート sq:Stampa:Stampa të vjetruar sl:Predloga:Todsvetovana tr:Şablon:Geçersizş
- Template namespace templates
- Redirect templates