Misplaced Pages

Module:Template wrapper/doc: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Module:Template wrapper Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 21:21, 14 July 2018 editJJMC89 (talk | contribs)Edit filter managers, Autopatrolled, Administrators345,170 edits was done← Previous edit Revision as of 21:21, 14 July 2018 edit undoJJMC89 (talk | contribs)Edit filter managers, Autopatrolled, Administrators345,170 edits not neededNext edit →
Line 1: Line 1:
{{documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see ]) --> <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see ]) -->
== Usage == == Usage ==

Revision as of 21:21, 14 July 2018

Usage

{{#invoke:Template wrapper|wrap|_template=wrapped template|_exclude=named parameter, named parameter, ...}}

This module is to be used in wrapper templates to allow those templates to provide default parameter values and allow editors to pass additional parameters to the underlying template.

This module requires one parameter: |_template=, the name (without namespace) of the template that is wrapped.

When writing a wrapper template, give this module all of the normally required default parameters necessary to use the template in its base form. Editors then use the wrapper template as is or may supply additional parameters. Any of the normal parameters supported by the wrapped template may be added to the wrapper template or supplied by editors in article space. When an editor supplies a parameter that has a default value in the wrapper template, the editor-supplied value overrides the default. When it is necessary to remove a default parameter, editors may set the parameter value to the special keyword unset which will cause this wrapper module to erase the wrapper template's default value for that parameter. This module discards empty parameters.

Parameters that are used only by the wrapper should be either positional ({{{n}}}) or listed in |_exclude= (a comma-separated list of named parameters). This module will not pass these types of parameters to the wrapped template.


Module:Template wrapper/doc: Difference between revisions Add topic