Template:Ent: Difference between revisions
Jump to navigation
Jump to search
(Removed padding from <code> i.e. the gap at its ends. Should look much nicer e.g. if {{ent}} is followed by a punctuation mark. Please give an example where this change is a problem when reverting this.) |
Kestrelguy (talk | contribs) m (can now specify an alternate name to show.) |
||
Line 1: | Line 1: | ||
{{lang|Template:Ent}} | {{lang|Template:Ent}} | ||
<onlyinclude><includeonly><code style=padding:0>[[{{{1}}}]]{{#if:{{{2|}}}| {{{2|}}}|}}</code></includeonly></onlyinclude> | <onlyinclude><includeonly><code style=padding:0>[[{{{1}}}|{{{alt|{{{1}}}}}}]]{{#if:{{{2|}}}| {{{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. | 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}}. | ||
Optionally, you can specify a second field of text to | 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}}. | <code><nowiki>{{ent|sv_cheats|1}}</nowiki></code> would give you {{ent|sv_cheats|1}}. | ||
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}}. | |||
[[Category:Templates]] | [[Category:Templates]] |
Revision as of 10:02, 24 May 2022
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
.
Additionally, you can specify {{{alt}}} as a different name to show. For example, {{ent|Team Fortress 2.fgd|alt=tf.fgd}}
would return tf.fgd
.