Help: Template Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.Anti-spam check. Do not fill this in! ===Parameters=== <!--[[Help:Parameters]] redirects here, so: --> {{about|template parameters|search parameters|Help:Searching#Parameters|section=yes}} {{shortcut|H:PARAMETER|WP:PARAMETER}} The basic transclusion syntax given above can be extended with [[parameter]]s, which are used to control the template's output. The syntax for this is {{tnull|{{var|Template name}}|{{var|parameter}}|{{var|parameter}}|{{var|...}}}} where <code>{{var|Template name}}</code> is the name of the template, and each <code>{{var|parameter}}</code> may either contain just a value (these are called ''{{dfn|unnamed parameters}}'') or be of the form <code>{{var|name}}={{var|value}}</code> (''{{dfn|named parameters}}''). The first, second, third, etc. unnamed parameters are given the names <code>1</code>, <code>2</code>, <code>3</code>, etc. Whitespace characters (spaces, tabs, returns) are stripped from the beginnings and ends of {{em|named}} parameter names and values, but not from the middle: thus <code><nowiki>{{ ... | myparam = this is a test }}</nowiki></code> has the same effect as <code><nowiki>{{ ... |myparam=this is a test}}</nowiki></code>. This does not apply to {{em|unnamed}} parameters, where all whitespace characters are preserved. What parameters (if any) can or should be passed to a template and how they are to be named is defined in the coding of that template. A template call can specify named parameters in any order. Superfluous or misnamed parameters are ignored; unspecified parameters are assigned default values. If a parameter is specified more than once, the last value takes effect. The value of a parameter can be the empty string, such as when the pipe or equals sign is followed immediately by the next pipe or the closing braces. This is different from not specifying the parameter at all, which results in a default value, although templates are often coded so as to behave the same in both cases. If a template call specifies a parameter which is not defined in the template, it has no effect. Sometimes editors do this on purpose: For example, {{para|reason}} is frequently used as a pseudo-parameter to explain briefly in the wiki source why the template call was put there.{{efn|Some templates, such as {{tlx|Requested move}}, have code to display {{para|reason}} as visible output; whether to do so is determined on a template-by-template basis.}} Some templates use {{ml|check for unknown parameters|check|...}} to warn the editor if a parameter is being used that is not accounted for in the template's code; this is mostly used for [[Help:Infobox|infoboxes]] and other templates with a large number of complicated parameters, where the presence of an unknown one is usually an unintentional error. If you update such a template to define a new parameter, its call to the module must also be updated to include the new parameter. Wikitext syntax does not allow natively to create truly [[variadic template]]s, but only pseudo-variadic ones, that check the incoming parameters one by one until a certain fixed amount. It is possible to break this limitation however by using dedicated modules. For simple cases, {{ml|separated entries|main}} allows to expand all sequential parameters blindly and has the ability to set custom delimiters. For more complex cases, {{ml|params|}} allows to count, list, map, filter and propagate all incoming parameters without knowing their number in advance. Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page