Template:Code2: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "<onlyinclude><includeonly><!-- -->{{code |style={{{style|1}}} |select={{{select|1}}} |color={{{color|}}} |bg={{{bg|{{{background|}}}}}} |{{{1}}}}}<!-- --></includeonly></onl...")
 
({{Code}} had received changes to its parameters, so this template hasn't looked as intended for some time.)
 
Line 2: Line 2:


-->{{code
-->{{code
|style={{{style|1}}}
|preset={{{preset|2}}}
|select={{{select|1}}}
|select={{{select|}}}
|color={{{color|}}}
|highlight={{{highlight|}}}
|bg={{{bg|{{{background|}}}}}}
|style={{{style|}}}
|{{{1}}}}}<!--
|{{{1}}}}}<!--


--></includeonly></onlyinclude><!--
--></includeonly></onlyinclude><!--


-->This template is equivalent to {{tl2|Code}}, but with different default values, namely {{param|style|&#124;1}} and {{param|select|&#124;1}}. Both accept the same parameters.
-->This template is equivalent to {{tl2|Code}}, but with different default values, namely {{param|preset|&#124;2}}. Both templates accept the same parameters.


{{code2|{{tl2|Code|<nowiki>style=1|select=1|</nowiki>Text}} -> {{tlc|Code2|Text}}}}
This means that {{tl2|Code|<nowiki>preset=2|</nowiki>Text}} is equivalent to {{tlc|Code2|Text}}, but longer.


{| class=standard-table
{| style="background:transparent; border:1px solid #666"
! Example
! Example
! Preview
! Preview

Latest revision as of 15:47, 30 August 2023

This template is equivalent to {{Code}}, but with different default values, namely {{{preset||2}}}. Both templates accept the same parameters.

This means that {{Code|preset=2|Text}} is equivalent to {{Code2|Text}}, but longer.

Example Preview
{{Code|Hello World!}} Hello World!
{{Code2|Hello World!}} Hello World!