Vorlage:Subst check top/Doku

Aus skandinavien-wiki.net
< Vorlage:Subst check top
Version vom 8. August 2010, 20:13 Uhr von imported>MSGJ (moved Template:Substcheck/doc to Template:Substchecktop/doc: think this is in the wrong place)

Usage

Place these templates onto the main template in the following manner.

{{{{{|safesubst:}}}substchecktop|[template pagename]|subst={{{subst|}}}}}

...template code...

{{{{{|safesubst:}}}substcheckbottom|subst={{{subst|}}}}}

These templates will check the main template for substitution and give an error message if it has been accidentally transcluded by having {{substchecktop}} placed above the main template code and {{substcheckbottom}} placed below the main template code.

{{substchecktop}} takes in an input for the main template name as a parameter. This is shown above as [template pagename]. This parameter should be entered so that the default error message refers to the correct main template. This default error message can be optionally replaced by a custom error message by using the message parameter. This parameter accepts templates and it is recommended that a message template be used for long messages to keep the parameter value short. {{substcheckbottom}} does not use these parameters.

Both these templates use subst={{{subst|}}} as one of the parameters. This allows optional transclusion for demonstration purposes by setting the subst parameter on the main template to nosubst.

See also