Vorlage:Subst check top/Doku: Unterschied zwischen den Versionen
Vorlage:Subst check top/Doku (Quelltext anzeigen)
Version vom 26. Dezember 2013, 16:41 Uhr
, vor 10 Jahrenfixes, da Vorlage substcheckbottom gelöscht
K (DerFussi verschob die Seite Vorlage:Subst check top/doc nach Vorlage:Subst check top/Doku, ohne dabei eine Weiterleitung anzulegen) |
(fixes, da Vorlage substcheckbottom gelöscht) |
||
Zeile 5: | Zeile 5: | ||
=== Usage === | === Usage === | ||
Place {{#switch: {{BASEPAGENAME}} | Subst check top=this template and {{tl| | Place {{#switch: {{BASEPAGENAME}} | Subst check top=this template and {{tl|subst check bottom}} | Subst check bottom=this template and {{tl|subst check top}} | #default=these templates }} onto the main template in the following manner. | ||
<code><nowiki>{{{{{|safesubst:}}} | <code><nowiki>{{{{{|safesubst:}}}subst check top|[template pagename]|subst={{{subst|}}}}}</nowiki></code> | ||
<code><nowiki>...template code...</nowiki></code> | <code><nowiki>...template code...</nowiki></code> | ||
<code><nowiki>{{{{{|safesubst:}}} | <code><nowiki>{{{{{|safesubst:}}}subst check bottom|subst={{{subst|}}}}}</nowiki></code> | ||
{{#switch: {{BASEPAGENAME}} | Subst check top=This template, along with {{tl|substcheckbottom}}, | Subst check bottom=This template, along with {{tl|substchecktop}}, | #default=These templates }} will check the main template for substitution and give an error message if it has been accidentally transcluded by having {{#ifeq: {{BASEPAGENAME}} | Subst check top | this template | {{tl|substchecktop}} }} placed above the main template code and {{#ifeq: {{BASEPAGENAME}} | Subst check bottom | this template | {{tl|substcheckbottom}} }} placed below the main template code. | {{#switch: {{BASEPAGENAME}} | Subst check top=This template, along with {{tl|substcheckbottom}}, | Subst check bottom=This template, along with {{tl|substchecktop}}, | #default=These templates }} will check the main template for substitution and give an error message if it has been accidentally transcluded by having {{#ifeq: {{BASEPAGENAME}} | Subst check top | this template | {{tl|substchecktop}} }} placed above the main template code and {{#ifeq: {{BASEPAGENAME}} | Subst check bottom | this template | {{tl|substcheckbottom}} }} placed below the main template code. |