Template:RenameCategory View history

(added ability to include desired category name)
m (changed mbox to caution)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{mbox
{{mbox
| type      = notice
| type      = caution
| text      = This category should be renamed to {{{1|sentence case}}}. This is done by editing each page linked to this one. Rename the category link (on the doc page for templates). If a doc page is updated, be sure to edit and save the main page with no changes. That will force the category name to be updated. When all links to this category are removed, delete this category, or add {{tl|Delete page}} to the category page.
| text      = {{#ifeq: {{{target|}}} | on | <!--
--> This category is replacing [[:Category:{{{1|}}}]]. You can help by going to that page and updating the category on the linked pages to '''Category:{{PAGENAME}}'''. If the linked category in this message box is red, that means the category does not exist and, unless it is just spelled wrong, this message box can be removed from this page.
<!--
--> | This category should be renamed to {{#if:{{{1|}}}|[[:Category:{{{1}}}]]|sentence case}}. This is done by editing each page linked to this one. Rename the category link (on the doc page for templates). If a doc page is updated, be sure to edit and save the main page with no changes. That will force the category name to be updated. When all links to this category are removed, delete this category, or add {{tl|Delete page}} to the category page. <!--
-->}} <!-- End Target -->
}}<noinclude>{{documentation}}</noinclude><includeonly><!--
}}<noinclude>{{documentation}}</noinclude><includeonly><!--
This category is for the page on which this template sits.
This category is for the page on which this template sits.
-->[[Category:Categories needing attention]]</includeonly>
-->[[Category:Categories needing attention]]</includeonly>

Latest revision as of 17:01, 21 May 2017

This category should be renamed to sentence case. This is done by editing each page linked to this one. Rename the category link (on the doc page for templates). If a doc page is updated, be sure to edit and save the main page with no changes. That will force the category name to be updated. When all links to this category are removed, delete this category, or add {{Delete page}} to the category page.
Documentation icon Template documentation[view] [edit] [history] [purge]

This template is placed on a category page that needs to be renamed. Reasons include typos, changing to sentence case, removing unnecessary plural form, etc.

Place {{RenameCategory}} on the category page to display the above message.

Parameters

There are two optional parameters.

Unnamed

When provided, the first unnamed parameter will display a link to the category for which this category should be renamed. Each page that includes the old named category should be updated with the new category name. If the parameter is not included, the template will say the category needs to be renamed to sentence case, but will not include a link, so it is better to always include the parameter.

Target

When |target=on is added, the template is used on the target category page to point back to the category page being renamed. At this time, the template is unable to determine the existence of a category page, so it will show up red after the source page is deleted. At that time the template can be removed.

When the |target= is used, the unnamed parameter becomes required, or the template will not make sense since the target category is hopefully already spelled correctly or in sentence case.

The above documentation is transcluded from Template:RenameCategory/doc.
Please add categories to the /doc subpage.
Subpages of this template.