模板:Renamed/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
|
40px | This is a documentation subpage for 模板:Renamed. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:模板 |用户 |模板 template page |{{#if:模板 |模板 page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:模板:Renamed | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
Purpose编辑
Renaming, or moving a page, might result in double redirects pointing to the original article name which need to be fixed. It could also make it necessary for other changes to be made to an article's content so that it aligns properly with the new title. In some cases where such changes are not immediately made at the time of page move, a notice may be beneficial to prevent confusion.
Usage编辑
This template adds a message box to an article in order to inform editors and readers of the article's recent name change. It should remain at the top of the page at least until any obvious or major incongruences are fixed.
Place the following wikitext at the top of an article: {{Renamed|from=Old title|date=11月 2024}}
Parameters编辑
There are only two parameters for this template, but both are required:
|{{SAFESUBST:#if:from|from=}}
(or|{{SAFESUBST:#if:old|old=}}
) should be the original title of the article it was moved from. The double-bracket enclosure (i.e. [[Article name]] format) is not needed, the template does it automatically.|{{SAFESUBST:#if:date|date=}}
takes the current month and year and adds it at the end of the template for reference. (Ex:|{{SAFESUBST:#if:date|date=}}December 2020
)
TemplateData编辑
|={{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.
|None|none=Parameter usage report |for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Renamed}}. |#default=[1]
}}|This is the {{#if:|TemplateData|TemplateData}} documentation for this template used by VisualEditor and other tools; {{#switch:
|={{#ifeq:{{safesubst:#switch: yes |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee the monthly parameter usage report for {{#if:|[[Template:]]|this template}}.
|None|none=Parameter usage report |for|For=Parameter usage report for {{#if:|[[Template:]]|Template:Renamed}}. |#default=[2]
}}}}
TemplateData for Renamed
{{#switch:
{{#if: | {{{demospace}}} | {{#ifeq:模板|模板 | template | other }} }}
| template = {{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||
}} | other | #default = }}
<templatedata> { "params": { "from": { "aliases": [ "old" ], "label": "Moved from", "description": "The original title of the article before it was renamed", "example": "Ask Jeeves", "type": "wiki-page-name", "required": true }, "date": { "label": "Month and year", "description": "The month and year that the template was added", "example": "December 2020", "type": "string", "default": "{{SUBST:CURRENTMONTHNAME}} {{SUBST:CURRENTYEAR}}", "autovalue": "{{SUBST:CURRENTMONTHNAME}} {{SUBST:CURRENTYEAR}}", "required": true } }, "description": "Adds a message box to an article informing editors and readers of a recent title change. Renaming (or page moving) may require additional edits to be made to an article's content and/or redirects to the original article name. This template should be removed once the necessary fixes are complete.", "format": "inline" } </templatedata>