Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Codef: Difference between revisions

Template page
it begins...
 
simplified layout, simplified examples
Line 6: Line 6:




You can use {{code|<nowiki>}} and {{code|</nowiki>}} tags in the argument if you escape them with {{code|<}}
You can use HTML/XML tags in the argument if you escape them with {{codef|<}}
* {{code|{{code{{!}}&amp;lt;nowiki> ... &amp;lt;/nowiki>}}}} yields <code>&lt;nowiki> ... &lt;/nowiki></code>
* {{codef|{{codef{{!}}1=&lt;span style="font-weight:bold">TEXT&lt;/span>}}}} yields {{codef|1=<span style="font-weight:bold">TEXT</span>}}
* {{codef|{{codef{{!}}1=&amp;lt;span style="font-weight:bold">TEXT&amp;lt;/span>}}}} yields {{codef|1=&lt;span style="font-weight:bold">TEXT&lt;/span>}}




Most other HTML/XML tags should work when you explicitly assign the parameter
Template calls may work if you escape the pipe character {{codef|{{!}}}}
* {{codef|{{codef{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}} yields {{codef|{{shortcuts|COM:SCOPE}}}}
* {{codef|{{codef{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}} yields {{codef|{{shortcuts{{!}}COM:SCOPE}}}}


* {{code|{{code{{!}}<div style="float left; width:2em; height:2em">TEXT</div>}}
}} yields {{code|<div style="float left; width:2em; height:2em">TEXT</div>}}
* {{code|{{code{{!}}1=<div style="float left; width:2em; height:2em">TEXT</div>}}
}} yields {{code|1=<div style="float left; width:2em; height:2em">TEXT</div>}}
Template calls may work if you escape the pipe character {{code|{{!}}}}
* {{code|{{code{{!}}{{shortcuts{{!}}COM:SCOPE}}}}}} yields {{code|{{shortcuts|COM:SCOPE}}}}
* {{code|{{code{{!}}{{shortcuts{{((}}!{{))}}COM:SCOPE}}}}}} yields {{code|{{shortcuts{{!}}COM:SCOPE}}}}


== See also ==
== See also ==
* {{tl|codef}} Same as this, but without the nowiki functionality, useful when the code has extra formatting
* {{tl|code}} Same as this, but adds nowiki functionality, may save escaping


</noinclude>
</noinclude>

Revision as of 22:16, 9 January 2010


Copied from {{Code}} and modified, can be used in place of <code> ... </code> tags.

{{codef|FOR i:=1 TO ∞ & beyond}} yields FOR i:=1 TO ∞ & beyond


You can use HTML/XML tags in the argument if you escape them with &lt;

  • {{codef|1=<span style="font-weight:bold">TEXT</span>}} yields TEXT
  • {{codef|1=&lt;span style="font-weight:bold">TEXT&lt;/span>}} yields <span style="font-weight:bold">TEXT</span>


Template calls may work if you escape the pipe character |

  • {{codef|{{shortcuts|COM:SCOPE}}}} yields Template:Shortcuts
  • {{codef|{{shortcuts{{!}}COM:SCOPE}}}} yields {{shortcuts|COM:SCOPE}}


See also

  • {{Code}} Same as this, but adds nowiki functionality, may save escaping


Contents
Cookies help us deliver our services. By using our services, you agree to our use of cookies.