Template:Cnw/doc

From TrainzOnline
< Template:Cnw
Revision as of 00:01, 6 July 2013 by Fabartus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


 
It contains usage information, categories and other informational content that is best arranged so that it is not part of the original template page, such as in many cases, examples of how to use the template in question.
  • Documentation subpages were developed to reduce server demands, or to protect the code version of widely used templates.
     

Combination of <code> and <nowiki>.

Unlike with <pre>

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

, wrapping still works.

Usage

Write "|" between braces of the wikitext to be displayed (and if its last character is a closing brace, also after that), and also inside tags, to avoid their interpretation by the server.

Write "|" in the desired wikitext as {{!}}

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

.


a{{cnw|'''bold''' ''italics'' {|{tc}|} [[link]] '''bold''' ''italics'' '''bold''' ''italics''}}b

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

gives:


a'''bold''' ''italics'' {{tc}} [[link]] '''bold''' ''italics'' '''bold''' ''italics''

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

b



Compare (not wrapping):

a{{#tag:syntaxhighlight|'''bold''' ''italics'' {{tc}} [[link]] '''bold''' ''italics'' '''bold''' ''italics''|lang=text| enclose="none"}}b

gives


aUnknown extension tag "syntaxhighlight"b


Limitations

The "|" does not avoid interpretation by the browser. For example, a code like &rarr;

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.
is not shown but interpreted by the browser. Also, both a single and multiple newlines are displayed as a space by the browser.

{{cnw|arrow      &rarr; {{tc}}

''italics''
[[link]]}}

gives:


arrow → [[:Template:Tc]] ''italics'' [[link]]

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

To preserve paragraphs, apply the template for each line separately. To preserve also single newlines, use also <poem>

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.
tags.

<poem>
{{cnw|{|{tc}|}}}

{{cnw|''italics''}}
{{cnw|[[link]]}}}}
</poem>

gives:


<poem> {{tc}

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

}

''italics''

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

[[link]]

This page has it's origination in the Wikimedia Foundation's development website Meta-wiki or has been exported and is now part of the newer Mediawiki software resources website for assisting new wikis with startup organization and has been copied according to the terms of the (CC-BY-SA-3.0), the GFDL standard GNU pulic license or the source file(s) is/are in the public domain.

}} </poem>


See also

Personal tools