Template:Code/doc: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
(+TR)
imported>FrozenPlum
m (Put back what's missing)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{doc/start}}
<!-- Documentation here -->
To be used if you want to list some short code, which you want to stand out. Similar to using <nowiki><code></code></nowiki> tags, except that it has a grey background.
To be used if you want to list some short code, which you would like to stand out. Similar to using <nowiki><code></code></nowiki> tags, except that it has a grey background.


== Usage ==
== Usage ==
Use {{tl|code|Code to display}}, which results in {{code|Code to display}}.
Use <code><nowiki>{{code|Code to display}}</nowiki></code>, which results in {{code|Code to display}}.


; Unnamed parameter 1
; Unnamed parameter 1
Line 18: Line 19:


== Examples ==
== Examples ==
{{tl|code|lang{{=}}css|border:1px solid #fff}} => results in {{code|lang=css|border:1px solid #fff}}
<code><nowiki>{{code|code|lang{{=}}css|border:1px solid #fff}}</nowiki></code> => results in {{code|lang=css|border:1px solid #fff}}


Note: Template based off [[wikipedia:Template:Code]] and [[mw:Template:Code]]
Note: Template based off [[wikipedia:Template:Code]] and [[mw:Template:Code]]


<includeonly>
<noinclude>
<!-- Template categories/interwikis here -->
[[tr:Şablon:Kod/belge]]
[[Category:Templates]]
</noinclude>
[[Category:Formatting templates]]
{{doc/end}}
</includeonly>

Latest revision as of 22:41, 29 March 2022

This is the documentation page, it should be transcluded into the main template page. See Template:Documentation for more information

To be used if you want to list some short code, which you would like to stand out. Similar to using <code></code> tags, except that it has a grey background.

Usage

Use {{code|Code to display}}, which results in Code to display.

Unnamed parameter 1

The code to display.

class=

CSS class(es).

id=

Id attribute.

lang=

The language of code.

Examples

{{code|code|lang{{=}}css|border:1px solid #fff}} => results in border:1px solid #fff

Note: Template based off wikipedia:Template:Code and mw:Template:Code