Template:Ent/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
This template is a faster and cleaner way of marking text as both a link and code. Its primary use is on entity names. See the following for its syntax.
This template is a faster and cleaner way of marking text as both a link and code. It should be used only on entity names. See the following for its syntax.


== Parameters and Examples ==
== Parameters and Examples ==
{{todo|document {{param|eng}}.}}
{| class=standard-table | style="width:100%"
{| class=standard-table | style="width:100%"
|-
|-
Line 12: Line 11:
|-
|-
| align=center |{{Code|{{Param}}}}
| align=center |{{Code|{{Param}}}}
|The entity name should link and show.
| The entity name should link and show.
|{{CodeBlock|<nowiki>{{ent|logic_relay}}</nowiki>}}
| {{CodeBlock|<nowiki>{{ent|logic_relay}}</nowiki>}}
|{{Capsule|{{ent|logic_relay}}}}
| {{Capsule|{{ent|logic_relay}}}}
|-
|-
| align=center |{{Code|{{Param|2}}}}
| align=center |{{Code|{{Param|game}}}}
|Optionally, you can specify a second field of text to not be counted as a link.
| Game name. Automaticaly appends <code>' ({{param|game}})'</code> to the link.
| {{CodeBlock|<nowiki>{{ent|sv_cheats|1}}</nowiki>}}
| {{CodeBlock|<nowiki>{{ent|player|game=Left 4 Dead series}}</nowiki>}}
| {{Capsule|{{ent|sv_cheats|1}}}}
| {{Capsule|{{ent|player|game=Left 4 Dead series}}}}
|-
|-
| align=center |{{Code|{{Param|alt}}}}
| align=center |{{Code|{{Param|engine}}}}
|The entity name should show. Additionally, you can specify {{Param|alt}} as a different name to show.
|Engine name. Specifying
|{{CodeBlock|<nowiki>{{ent|Team Fortress 2.fgd|alt=tf.fgd}}</nowiki>}}
* 0 or goldsrc appends ' (GoldSrc)' to the link
|{{Capsule|{{ent|Team Fortress 2.fgd|alt=tf.fgd}}}}
* 1 or source appends ' (Source)' to the link
* 2 or source 2 appends ' (Source 2)' to the link
|{{CodeBlock|<nowiki>{{ent|func_pushable|engine=goldsrc}}</nowiki>}}
|{{Capsule|{{ent|func_pushable|engine=goldsrc}}}}
|-
|-
|}
|}

Revision as of 08:55, 9 September 2024

Edit-copy.png
This is a documentation subpage for Template:Ent.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This template is a faster and cleaner way of marking text as both a link and code. It should be used only on entity names. See the following for its syntax.

Parameters and Examples

Parameter Description Example Preview
{{{1}}} The entity name should link and show.
{{ent|logic_relay}}
{{{game}}} Game name. Automaticaly appends ' ({{{game}}})' to the link.
{{ent|player|game=Left 4 Dead series}}
{{{engine}}} Engine name. Specifying
  • 0 or goldsrc appends ' (GoldSrc)' to the link
  • 1 or source appends ' (Source)' to the link
  • 2 or source 2 appends ' (Source 2)' to the link
{{ent|func_pushable|engine=goldsrc}}

See also