Template:Require subst/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 4: Line 4:
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
<includeonly>{{safesubst:require subst|template= [Name of template] |1=</includeonly>
<includeonly>{{safesubst:require subst|template= [Name of template] |1=</includeonly>
... (normal template code) ...
(normal template code)
<includeonly>}}</includeonly>
<includeonly>}}</includeonly>
</syntaxhighlight>
</syntaxhighlight>
Line 10: Line 10:
If a substituted template is transcluded instead of substituted, an error message is displayed. For example:
If a substituted template is transcluded instead of substituted, an error message is displayed. For example:


{{error|This template must be {{w|wp:Template substitution|substituted}}. Replace <nowiki>{{</nowiki>template name ...<nowiki>}} with {{</nowiki>subst:template name ...<nowiki>}}</nowiki>.}}
{{error|This template must be {{w|wp:Template substitution|substituted}}. Replace <nowiki>{{template name …}}</nowiki> with <nowiki>{{subst:template name }}</nowiki>.}}