Template:Altnames/doc: Difference between revisions
(oops, accidentally moved english doc page to /en. Forgot that {{tl|doc}} doesn't do that.) |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
<!-- Please place categories where indicated at the bottom of this page.) --> | <!-- Please place categories where indicated at the bottom of this page.) --> | ||
{{inline note templates}} | {{inline note templates}} | ||
This template is intended to be used when | This template is intended to be used when multiple entity classnames are tied to single C++ class and they are also usable interchangeably with no or very little side effects, especially those that do not appear to serve any purpose other than deprecation. | ||
Best example of this is prop_physics and physics_prop because physics_prop's classname keyvalue is also fixed-up to prop_physics immediately as it spawns before any classname checks can happen. But prop_physics_override which is also fixed-up shortly after spawning to prop_physics would not be marked as altname because the usage of the entity differs and there are checks in code that allowed it to spawn despite the model not having prop data. | |||
== Usage == | == Usage == | ||
Line 8: | Line 10: | ||
* {{param|name1}} ''to'' {{param|name8}} - The alternate classnames. | * {{param|name1}} ''to'' {{param|name8}} - The alternate classnames. | ||
* {{param|misc}} - ''Optional:'' Use to display additional text in the same note. | * {{param|misc}} - ''Optional:'' Use to display additional text in the same note. | ||
* {{param|suf}} - ''Optional:'' This is a suffix that will be added to all elements of the template to display the content in the desired language (if it is translated into it). {{ | * {{param|suf}} - ''Optional:'' This is a suffix that will be added to all elements of the template to display the content in the desired language (if it is translated into it). {{note|There should be a colon before the language code, for example ":es".}} | ||
=== Example === | === Example === | ||
<code style=padding:0><nowiki>{{altnames|name1=x|name2=y|name3=z}}</nowiki></code> would return as: | <code style=padding:0><nowiki>{{altnames|name1=x|name2=y|name3=z}}</nowiki></code> would return as: | ||
Line 20: | Line 22: | ||
{{Doc/Sandbox other| | {{Doc/Sandbox other| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
[[Category:Notice templates]] | |||
[[Category:Inline note templates]] | [[Category:Inline note templates]] | ||
}} | }} |
Latest revision as of 06:30, 17 September 2024

Don't forget to purge the contents of the base page upon creating or editing this subpage.
Template | Pages using it |
---|---|
28 August 2024 | |
{{note}} | 6,436 |
{{warning}} | 1,253 |
{{bug}} | 1,192 |
{{tip}} | 1,516 |
{{todo}} | 1,628 |
{{inline note}} | 2,188 |
{{confirm}} | 672 |
{{question}} | 11 |
{{fix}} | 170 |
{{important}} | 459 |
{{clarify}} | 169 |
{{elaborate}} | 18 |
{{main}} | 143 |
{{distinguish}} | 85 |
{{workaround}} | 122 |
{{seealso}} | 145 |
{{when}} | 1 |
{{where}} | 0 |
{{which}} | 2 |
{{why}} | 38 |
{{idea}} | 21 |
{{placementTip}} | 13 |
{{codenote}} | 21 |
{{altnames}} | 35 |
{{deprecated}} | 109 |
{{how}} | 23 |
{{example}} | 16 |
{{confusion}} | 53 |
{{thanks}} | 7 |
{{code Fix}} | 9 + 7 (16) |
{{vote}} | 4 |
This template is intended to be used when multiple entity classnames are tied to single C++ class and they are also usable interchangeably with no or very little side effects, especially those that do not appear to serve any purpose other than deprecation.
Best example of this is prop_physics and physics_prop because physics_prop's classname keyvalue is also fixed-up to prop_physics immediately as it spawns before any classname checks can happen. But prop_physics_override which is also fixed-up shortly after spawning to prop_physics would not be marked as altname because the usage of the entity differs and there are checks in code that allowed it to spawn despite the model not having prop data.
Usage
Parameters
- {{{name1}}} to {{{name8}}} - The alternate classnames.
- {{{misc}}} - Optional: Use to display additional text in the same note.
- {{{suf}}} - Optional: This is a suffix that will be added to all elements of the template to display the content in the desired language (if it is translated into it).
Note:There should be a colon before the language code, for example ":es".
Example
{{altnames|name1=x|name2=y|name3=z}}
would return as:

x
, y
and z
. {{altnames|name1=x|game={{game link|portal}}}}
would return as:


x
.