Template:Ent/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "This template is a faster and cleaner way of marking text as both a link and code. Its primary use is on entity names, but it is used on other things too, such as VMT paramete...")
 
 
(34 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This template is a faster and cleaner way of marking text as both a link and code. Its primary use is on entity names, but it is used on other things too, such as VMT parameters and console commands.
{{Doc/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.


The syntax is simple. <code><nowiki>{{ent|logic_relay}}</nowiki></code> would return as {{ent|logic_relay}}.
== Parameters and Examples ==
{| class=standard-table | style="width:100%"
|-
! Parameter
! Description
! Example
! Preview
|-
| align="center" | <code>{{Param}}</code>
| The entity name should link and show.
| <pre>{{ent|logic_relay}}</pre>
| bgcolor="#262626" | {{ent|logic_relay}}
|-
| align="center" | <code>{{Param|game}}</code>
| Game name. Appends <code>' ({{param|game}})'</code> to the link.
| <pre>{{ent|player|game=Left 4 Dead series}}</pre>
| bgcolor="#262626" | {{ent|player|game=Left 4 Dead series}}
|-
| align="center" | <code>{{Param|engine}}</code>
| 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
| <pre>{{ent|func_pushable|engine=goldsrc}}</pre>
| bgcolor="#262626" | {{ent|func_pushable|engine=goldsrc}}
|-
|}


Optionally, you can specify a second field of text to not be counted as a link.
== See also ==
* {{T|matparam}}
* {{T|cmd}}


<code><nowiki>{{ent|sv_cheats|1}}</nowiki></code> would give you {{ent|sv_cheats|1}}.
<includeonly>{{sandbox other||
 
[[Category:Templates]][[Category:Formatting templates]][[Category:Entity Templates]]
Additionally, you can specify {{param|alt}} as a different name to show. For example, <code><nowiki>{{ent|Team Fortress 2.fgd|alt=tf.fgd}}</nowiki></code> would return {{ent|Team Fortress 2.fgd|alt=tf.fgd}}.
}}</includeonly>

Latest revision as of 10:17, 24 August 2025

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}}
logic_relay
{{{game}}} Game name. Appends ' ({{{game}}})' to the link.
{{ent|player|game=Left 4 Dead series}}
player
{{{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}}
func_pushable

See also