Template:Cw: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:


===Example===
===Example===
: <nowiki>{{subst:</nowiki>{{lc:{{BASEPAGENAME}}}}<nowiki> |Here be code with '''wikicode'''.}}</nowiki> ... outputs: ...&nbsp; <code><nowiki>Here be code with '''wikicode'''.</nowiki></code>
: <<nowiki>{{subst:</nowiki>{{lc:{{BASEPAGENAME}}}}<nowiki> |Here be code with '''wikicode'''.}}</nowiki> ... outputs: ...&nbsp; <code><nowiki>Here be code with '''wikicode'''.</nowiki></code>


===Embedded substitution===
===Embedded substitution===

Revision as of 08:56, 17 February 2019

code>{{{1}}}

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:

code>{{{1}}}

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