Module:Params/doc: Difference between revisions

Content deleted Content added
flushing: +example
Line 2,473:
: <syntaxhighlight lang="wikitext" inline>{{#invoke:params|flushing|pipe function name}}</syntaxhighlight>
 
This modifier is used in conjunction with either <code>[[#leaving_substack|leaving_substack]]</code> or <code>[[#snapshotting|snapshotting]]</code>. See <code>[[#snapshotting|snapshotting]]</code> for more information on the stacking mechanism.
 
In the following example the three parameters {{para|1}}, {{para|2}}, and {{para|3}} are used as aliases for {{para|title}}, {{para|author}}, and {{para|language}} respectively. The <code>flushing</code> modifier ensures that in case both are present, the named alias has precedence over the positional alias.
 
<syntaxhighlight lang="wikitext">{{#invoke:params|
entering_substack|
discarding|1|
discarding|2|
discarding|3|
leaving_substack|
renaming_by_replacing|1|title|strict|
renaming_by_replacing|2|author|strict|
renaming_by_replacing|3|language|strict|
flushing|
concat_and_call|my_callback_template}}</syntaxhighlight>
 
{{vpad|1.5em|clear=none}}