Difference between revisions of "Template:Codenowiki/doc"

From blackwiki
Jump to navigation Jump to search
imported>JzG
m (Reverted edits by Sdkb (talk) to last version by Dibbydib)
imported>L235
(Undid revision 955574371 by JzG (talk) rv mass rollback on pages that predate grant of TPE per JzG's talk)
Line 3: Line 3:
 
{{Template shortcut|CoNo|Cnw}}
 
{{Template shortcut|CoNo|Cnw}}
 
{{Intricate template}}
 
{{Intricate template}}
{{Subst only}}
+
{{Subst only|auto=yes}}
 
{{Notice|Ignore the code appearing above; it is not how the final result will display}}
 
{{Notice|Ignore the code appearing above; it is not how the final result will display}}
 
This template provides a speedy way to wrap template source code in {{tag|code|content={{tag|nowiki}}}} markup. To work correctly, {{strong|it must be [[WP:SUBST|substituted]]}}.
 
This template provides a speedy way to wrap template source code in {{tag|code|content={{tag|nowiki}}}} markup. To work correctly, {{strong|it must be [[WP:SUBST|substituted]]}}.

Revision as of 06:29, 9 May 2020

This template provides a speedy way to wrap template source code in <code><nowiki>...</nowiki></code> markup. To work correctly, it must be substituted.

Recommended use is:

{{subst:codenowiki |1=(code)}}

i.e. so that anything before an equals (=) sign in the code isn't interpreted as a parameter name.

Example

{{subst:codenowiki |1=Here be code}} ... outputs: ...  Here be code

The code produced by the template for this output is:

<code><nowiki>Here be code</nowiki></code>

Embedded substitution

If the template is transcluded rather than substituted on a page, its output can be corrected by re-saving the page, triggering the substitution embedded within it:

{{subst:Nowiki|Here be code}}

Limitations

This template does not work with signatures. Typing {{subst:codenowiki|~~~~}} results in displaying your full signature's code.

See also