Template:Ent: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (moved from the "Templates" category (which isn't supposed to contain templates themselves, only categories) to the "Formatting templates" category.)
m (Protected "Template:Ent" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
 
(30 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{lang|Template:Ent}}
{{Doc}}
<onlyinclude><includeonly><code style=padding:0>[[{{{1}}}{{{suf|}}}|{{{alt|{{{1}}}}}}]]{{#if:{{{2|}}}|&nbsp;{{{2}}}|}}</code></includeonly></onlyinclude>
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.


The syntax is simple. <code><nowiki>{{ent|logic_relay}}</nowiki></code> would return as {{ent|logic_relay}}.
<includeonly>


Optionally, you can specify a second field of text to not be counted as a link.
<onlyinclude><!--


<code><nowiki>{{ent|sv_cheats|1}}</nowiki></code> would give you {{ent|sv_cheats|1}}.
--><kbd>[[{{langprefix}}{{ucfirst:{{{1}}}}}{{
#switch: {{{engine|}}}{{{eng|}}}{{{game|}}}
| 0 | gs | gldsrc | goldsrc = &nbsp;(GoldSrc)
| 1 | src | source = &nbsp;(Source)
| 2 | src2 | source2 = &nbsp;(Source 2)
| =
| #default = &nbsp;({{{engine|}}}{{{eng|}}}{{{game|}}})
}}|{{{alt|{{{1}}}}}}]]{{#if: {{{2|}}} | &nbsp;{{{2}}}{{Ent/param2usecheck}}}}</kbd><!--


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}}.
--></onlyinclude>
[[Category:Formatting templates]]
 
</includeonly>

Latest revision as of 13:22, 5 April 2025

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

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