Template:Cw: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
test
 
work in progress
Line 1: Line 1:
<code>{{<includeonly>subst:</includeonly>Nowiki|{{{1}}}}}</code><noinclude>
nowiki><code>{{{1}}}</code></nowiki><noinclude>
==Documentation==
==Documentation==
Work in progress.
'''C'''ode, no '''w'''iki - turns inserts tags <nowiki><code><nowiki></nowiki> and <nowiki></nowiki></code></nowiki> around wikitext.  Useful for when describing code that has template [[Wikipedia:Transclusion|transclusion]] or other wiki code.
'''C'''ode, no '''w'''iki - turns inserts tags <nowiki><code><nowiki></nowiki> and <nowiki></nowiki></code></nowiki> around wikitext.  Useful for when describing code that has template [[Wikipedia:Transclusion|transclusion]] or other wiki code.


Line 19: Line 21:


===Source===
===Source===
Taken from [[Wikipedia:Template:Codenowiki]].
<s>Taken from [[Wikipedia:Template:Codenowiki]].</s> - sub template dependency hell - try different approach


[[Category:Templates infoboxes]]
[[Category:Utility Template]]
</noinclude>
</noinclude>

Revision as of 08:48, 17 February 2019

nowiki>{{{1}}}</nowiki>

Documentation

Work in progress.

Code, no wiki - turns inserts tags <code><nowiki> and </nowiki> around wikitext. Useful for when describing code that has template transclusion or other wiki code.

To work correctly, it must be substituted.

Example

{{subst:cw |Here be code with '''wikicode'''.}} ... outputs: ...  Here be code with '''wikicode'''.

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:

nowiki>Here be code</nowiki>

Limitations

This template does not work with signatures. Typing ~~~~ results in displaying your full signature's code.

Arguments

No arguments.

Source

Taken from Wikipedia:Template:Codenowiki. - sub template dependency hell - try different approach