Template:Code: Difference between revisions
Template page
More actions
update documentation |
added See also section, added {{codef}} to See also |
||
| Line 21: | Line 21: | ||
* {{code|{{code{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}} yields {{code|{{shortcuts|COM:SCOPE}}}} | * {{code|{{code{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}} yields {{code|{{shortcuts|COM:SCOPE}}}} | ||
* {{code|{{code{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}} yields {{code|{{shortcuts{{!}}COM:SCOPE}}}} | * {{code|{{code{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}} yields {{code|{{shortcuts{{!}}COM:SCOPE}}}} | ||
== See also == | |||
* {{tl|codef}} Same as this, but without the nowiki functionality, useful when the code has extra formatting | |||
</noinclude> | </noinclude> | ||
Revision as of 21:56, 9 January 2010
Copied from Wikipedia, can be used in place of <code><nowiki> ... </nowiki></code> constructs.
{{code|FOR i:=1 TO ∞ & beyond}} yields FOR i:=1 TO ∞ & beyond
You can use <nowiki> and </nowiki> tags in the argument if you escape them with <
{{code|<nowiki> ... </nowiki>}}yields<nowiki> ... </nowiki>
Most other HTML/XML tags should work when you explicitly assign the parameter
{{code|<div style="float left; width:2em; height:2em">TEXT</div>}}yields{{{1}}}{{code|1=<div style="float left; width:2em; height:2em">TEXT</div>}}yields<div style="float left; width:2em; height:2em">TEXT</div>
Template calls may work if you escape the pipe character |
{{code|{{shortcuts|COM:SCOPE}}}}yields[[:Template:Shortcuts]]{{code|{{shortcuts{{!}}COM:SCOPE}}}}yields{{shortcuts|COM:SCOPE}}
See also
- {{Codef}} Same as this, but without the nowiki functionality, useful when the code has extra formatting