Difference between revisions of "Template:Deleted template/doc"

From blackwiki
Jump to navigation Jump to search
imported>CLCStudent
m (Reverted edits by 2405:205:100C:84CF:0:0:162:B0 (talk) to last version by Pppery)
Line 7: Line 7:
  
 
=== Usage ===
 
=== Usage ===
The template takes 1 compulsory parameters:
+
The template takes 3 compulsory parameters:
# the revision ID of the template at the time of it being deleted. Due to [[phab:T56712]], this parameter is no longer used, and the third parameter (date) is used to decide whether to treat the page like an old revision.
+
# the revision ID of the template at the time of it being deleted. Due to [[phab:T235957]], this parameter is no longer used, and the third parameter (date) is used to decide whether to treat the page like an old revision.
 
# template name
 
# template name
 
# date the template was deleted
 
# date the template was deleted
Line 16: Line 16:
 
Example:  
 
Example:  
  
<code>'''<nowiki>{{Deleted template|689090|Example|12 February 2011|</nowiki>'''<br/>
+
<code>'''<nowiki>{{Deleted template|388523941|Example|12 February 2011|</nowiki>'''<br/>
 
''Old template<br/>did various things<br/>and possibly other things<br/>''
 
''Old template<br/>did various things<br/>and possibly other things<br/>''
 
'''<nowiki>}}</nowiki>'''</code>
 
'''<nowiki>}}</nowiki>'''</code>
Line 27: Line 27:
 
# Use {{tl|hat}}/{{tl|hab}} to collapse usage instructions which are no longer relevant
 
# Use {{tl|hat}}/{{tl|hab}} to collapse usage instructions which are no longer relevant
 
# Remove any categories (possibly convert them to See Also links)
 
# Remove any categories (possibly convert them to See Also links)
# Add a {{tl|historical}} template as in this example for {{tl|expand}}: <code><nowiki>{{Historical|category=no|brief=yes|comment=This template was [[Template:Deleted template|deprecated]] following deletion discussion archived at [[Wikipedia:Templates_for_discussion/Log/2010_December_16 Template:Expand]]}}</nowiki></code>
+
# Add a {{tl|historical}} template as in this example for {{tl|expand}}: <code><nowiki>{{Historical|category=no|brief=yes|comment=This template was [[Template:Deleted template|deprecated]] following deletion discussion archived at [[Wikipedia:Templates_for_discussion/Log/2010_December_16#Template:Expand]]}}</nowiki></code>
 
# If used with {{tl|Ambox}} which has the {{para|name}} parameter present for the {{para|subst}} parameter, {{para|doc|no}} must also be passed to {{tl|Ambox}} and <nowiki><noinclude></nowiki>{{tl|documentation}}<nowiki></noinclude></nowiki> manually placed at the end of the template code.
 
# If used with {{tl|Ambox}} which has the {{para|name}} parameter present for the {{para|subst}} parameter, {{para|doc|no}} must also be passed to {{tl|Ambox}} and <nowiki><noinclude></nowiki>{{tl|documentation}}<nowiki></noinclude></nowiki> manually placed at the end of the template code.
  

Revision as of 12:03, 19 April 2020

{{Deleted template}} provides a way to delete templates but still retain them for the purpose of correctly displaying old revisions of pages. When using this method to delete a template, all existing transclusions should be removed in the usual way, and {{Deleted template}} added into the template being deleted. This should ensure correct display in old revisions, and a warning when used in a revision postdating the deletion.

Current revisions containing templates deleted in this way (as well as the deleted templates themselves) are automatically categorised in Category:Pages containing deleted templates.

Usage

The template takes 3 compulsory parameters:

  1. the revision ID of the template at the time of it being deleted. Due to phab:T235957, this parameter is no longer used, and the third parameter (date) is used to decide whether to treat the page like an old revision.
  2. template name
  3. date the template was deleted

To use this template, add it at the beginning of the template to be deleted, adding the closing brackets of {{Deleted template}} at the end:

Example:

{{Deleted template|388523941|Example|12 February 2011|
Old template
did various things
and possibly other things
}}

  • There is also one optional parameter: the |extra= parameter may be used to add further information at the end of the message.

Template documentation

Associated template documentation may be worth retaining, for example for references to alternative templates.

  1. Use {{hat}}/{{hab}} to collapse usage instructions which are no longer relevant
  2. Remove any categories (possibly convert them to See Also links)
  3. Add a {{historical}} template as in this example for {{expand}}: {{Historical|category=no|brief=yes|comment=This template was [[Template:Deleted template|deprecated]] following deletion discussion archived at [[Wikipedia:Templates_for_discussion/Log/2010_December_16#Template:Expand]]}}
  4. If used with {{Ambox}} which has the |name= parameter present for the |subst= parameter, |doc=no must also be passed to {{Ambox}} and <noinclude>{{documentation}}</noinclude> manually placed at the end of the template code.

See also