سانچہ:متروک سانچہ
![]() | سانچہ:متروک سانچہ کا استعمال اب متروک ہو چکا ہے، براہ کرم [[سانچہ:{{{2}}}]] کا استعمال کریں۔ |
The {{Deprecated template}} is a template placed in a given template's code to notify its users that a given template has been superseded or replaced by another template, or has simply been deprecated (i.e., advised to no longer be used) without a direct replacement. It is useful when a redirect is ineffective due to usage differences, or when reducing the number of redirects is desired to simplify bot parsing.
If the template is fully deprecated, the deprecated template's content can be fully replaced/overridden by the message from {{Deprecated template}}
using <includeonly>...</includeonly>
, ensuring that anyone using the template will only see the notification, and not invoke the deprecated template.
{{Historical template}} is a related template for use on templates where there is consensus for that template to be deprecated, but where removal of the template would seriously break the functionality of historical project pages.
{{Deleted template}} provides a way to delete templates but still retain them for the purpose of correctly displaying old revisions of pages.
Usage
[ترمیم]Templates not fully deprecated
[ترمیم]If the deprecated template is not yet ready for full deprecation since it is still in use (transcluded) on pages, add <noinclude>...</noinclude>
tags around the {{Deprecated template}}
template in the source code of the deprecated template. This ensures that the deprecation notice appears only on the template’s documentation page and not on every page where the template is transcluded.
If the template is not yet fully deprecated insert in the template's code:
<noinclude>
{{متروک سانچہ}} <!-- Replace with {{متروک سانچہ|old template name|new template name}} and remove <noinclude> tags when fully deprecated. See [[Template:Deprecated template]] for more information. -->
</noinclude>
Fully deprecated templates
[ترمیم]Once a template has been fully deprecated and is no longer transcluded on any pages, you can remove the <noinclude>...</noinclude>
tags surrounding the {{Deprecated template}}
in the deprecated template's source code. This will display the deprecation notice on any pages still using the deprecated template.
Afterward, consider nominating the template for deletion through Wikipedia:Templates for discussion, or replacing it with {{Historical template}} to indicate its deprecated status.
{{متروک سانچہ|Deprecated template name|New template name}}
Usage without a second (replacement) template name simply produces:
![]() | سانچہ:متروک سانچہ کا استعمال اب متروک ہو چکا ہے، |
Parameters
[ترمیم]Standard
{{Deprecated template|Old|New}}
![]() | سانچہ:Old کا استعمال اب متروک ہو چکا ہے، براہ کرم سانچہ:New کا استعمال کریں۔ |
Additional
The template can show parameters as follows:
{{Deprecated template|Old|New|parameter}}
{{Deprecated template|Old|New|<nowiki>parameter=foo</nowiki>}}
![]() | سانچہ:Old کا استعمال اب متروک ہو چکا ہے، براہ کرم [[سانچہ:New|parameter]] کا استعمال کریں۔ |
![]() | سانچہ:Old کا استعمال اب متروک ہو چکا ہے، براہ کرم [[سانچہ:New|parameter=foo]] کا استعمال کریں۔ |
The template can also show a note:
{{Deprecated template|Old|New|note=Further details can be inserted here, such as why the template is retained, the particulars of the replacement process, or when there are two or more replacements.}}
![]() | سانچہ:Old کا استعمال اب متروک ہو چکا ہے، براہ کرم سانچہ:New کا استعمال کریں۔ Further details can be inserted here, such as why the template is retained, the particulars of the replacement process, or when there are two or more replacements. |
The |note=
parameter can also be given as |reason=
or |result=
.
Special parameters for templates outside template namespace.
|old=
and |new=
can be used with the full names including namespace.
{{Deprecated template|old=Template:Old|new=Wikipedia:New}}
![]() | Template:Old کا استعمال اب متروک ہو چکا ہے، براہ کرم Wikipedia:New کا استعمال کریں۔ |
To link to a category full of templates, use :Category:Name of category here
, with a leading colon.
The |new=
parameter cannot be used with the third unnamed parameter (the one illustrating a parameter of the third template). For example, this is not valid:
{{Deprecated template|Old|new=User:SnorkelWeasel/MyTemplate|<nowiki>chickens=yes</nowiki>}}
Such a feature could be added, but it has never been needed yet.
Category suppression
The template can be prevented from categorizing by adding |nocat=true
. This is only intended for examples, e.g. in the template's own documentation. In that case, not only the page itself will not be categorized, but transclusions of such pages will also be prevented from categorizing in Category:Pages using deprecated templates. Do not use this parameter to passive-aggressively contest a template's documentation. Take up the matter on the template's talk page or that of a relevant other venue, such as WP:Village pump (technical).
اوپر دی گئی دستاویز صفحہ سانچہ:متروک سانچہ/دستاویز سے شامل کی گئی ہے۔ (ترمیم | تاریخچہ) صارفین سانچہ کے تختہ مشق (تخلیق | آئینہ) اور ثابتات (تخلیق) میں تجربات کرسکتے ہیں۔ براہ کرم /دستاویز کے ذیلی صفحہ پر زمرہ جات شامل فرمائیں۔ اس سانچہ کے ذیلی صفحات۔ |