Template:Redirect template/doc: Difference between revisions

update documentation
[checked revision][checked revision]
(remove removed parameter from documentation)
(update documentation)
 
(4 intermediate revisions by the same user not shown)
Line 1:
<noinclude>{{Documentation page}}</noinclude><!--
-->This template is a meta-template for [[:Category:Redirect templates|redirect templates]] that assign a category to the redirectredirects. They are meant to be transcluded in the first positional argument of [[Template:Redirect page]]. ItThis template takes following arguments:
* <code><nowiki>{{{1}}}</nowiki></code>: name of category being added.
* <code><nowiki>{{{2}}}</nowiki></code>: text to display after "this redirect".
* <code><nowiki>{{{nocat}}}</nowiki></code>: set to disable automatic categorization (should be set for templates themselves).
Templates built using this template can generate documentation using [[Template:Redirect template/doc template]] (which automatically adds [[:Category:Redirect templates]], unless <code>nocat</code> is set):
<syntaxhighlight lang="mediawiki">
{{Redirect template|Redirects|is in the top-level redirects category!|nocat={{{nocat|<noinclude>1</noinclude>}}}}}<noinclude>{{Documentation|Template:Redirect template/doc template|Category name}}</noinclude>content=
{{Redirect template/doc template|Redirects}}
</syntaxhighlight>
}}</noinclude>
Where the category name should match the first positional argument passed to the main template.
</syntaxhighlight><!--
-->{{#if:{{{nocat|}}}||[[Category:Meta-templates]]}}