Template:Ent: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(okay fixed it i think)
(Made it so you don't have to include a space in the first parameter for the second parameter to show properly.)
Line 1: Line 1:
<noinclude>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.
<includeonly><code>[[{{{1}}}]]{{#if:{{{2|}}}|&nbsp;{{{2|}}}|}}</code></includeonly><noinclude>
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}}.
The syntax is simple. <code><nowiki>{{ent|logic_relay}}</nowiki></code> would return as {{ent|logic_relay}}.
Line 5: Line 6:
Optionally, you can specify a second field of text to  not be counted as a link.
Optionally, you can specify a second field of text to  not be counted as a link.


<code><nowiki>{{ent|sv_cheats |1}}</nowiki></code> would give you {{ent|sv_cheats |1}}. (You have to put the space in the first text field. I don't know why but no big problem.)<br></noinclude>
<code><nowiki>{{ent|sv_cheats|1}}</nowiki></code> would give you {{ent|sv_cheats|1}}.
<code>[[{{{1}}}]]{{#if:{{{2|}}}|{{{2|}}}|}}</code>
<br>
</noinclude>

Revision as of 14:23, 15 July 2018

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. {{ent|logic_relay}} would return as logic_relay.

Optionally, you can specify a second field of text to not be counted as a link.

{{ent|sv_cheats|1}} would give you sv_cheats 1.