Difference between revisions of "Template:Tl"
From Ouroboros Portal
(added option to have parameter thingys included next to template link if user wished to show parameters as well as link to template.) |
m (14 revisions) |
||
| (10 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
| − | {{[[Template:{{{1}}}|{{{1}}}]]{{#if: {{{2|}}} | {{{2}}}{{!}} }}{{#if: {{{ | + | {{[[Template:{{{1}}}|{{{1}}}]]{{#if:{{{2|}}}|{{!}}{{{2}}} }}{{#if:{{{3|}}}|{{!}}{{{3}}} }}{{#if:{{{4|}}}|{{!}}{{{4}}} }}{{#if:{{{5|}}}|{{!}}{{{5}}} }}{{#if:{{{6|}}}|{{!}}{{{6}}} }}{{#if:{{{7|}}}|{{!}}{{{7}}} }}{{#if:{{{8|}}}|{{!}}{{{8}}} }}{{#if:{{{9|}}}|{{!}}{{{9}}} }}}}<noinclude> |
| − | = | + | <!-- |
| + | The #if statements are used to prevent the extra pipe "|" from displaying if the parameter is not specified. | ||
| + | --> | ||
| + | ==Purpose== | ||
<nowiki>{{Tl}}</nowiki> is used to display a template name as a link. '''Tl''' stands for '''Template link'''. | <nowiki>{{Tl}}</nowiki> is used to display a template name as a link. '''Tl''' stands for '''Template link'''. | ||
| − | + | ||
| + | Tl can currently handle 8 additional parameters that are simply displayed as given. | ||
| + | |||
| + | ;NOTE: The equals sign ("=") cannot be included directly because templates use equal signs to delimit named parameters. Replace any equal signs with their HTML entity representation: '''&#61;'''. | ||
| + | |||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
{{subst:Tl|template name to display}} | {{subst:Tl|template name to display}} | ||
| + | {{tl|template name to display}} | ||
</pre> | </pre> | ||
== Example == | == Example == | ||
| Line 16: | Line 24: | ||
| {{[[Template:Center|Center]]}} | | {{[[Template:Center|Center]]}} | ||
|- | |- | ||
| − | | <nowiki>{{tl|Userbox Server|Heroes|Freedom}}</nowiki> | + | | <code><nowiki>{{tl|Userbox Server|Heroes|Freedom}}</nowiki></code> |
| {{tl|Userbox Server|Heroes|Freedom}} | | {{tl|Userbox Server|Heroes|Freedom}} | ||
| − | |}</noinclude> | + | |- |
| + | | <code><nowiki>{{tl|SlashCommand|command&#61;bind|options&#61;key commands}}</nowiki></code> | ||
| + | | {{tl|SlashCommand|command=bind|options=key commands}} | ||
| + | |} | ||
| + | [[Category:Templates|{{PAGENAME}}]]</noinclude> | ||
Latest revision as of 04:04, 26 February 2009
{{[[Template:{{{1}}}|{{{1}}}]]}}
Purpose
{{Tl}} is used to display a template name as a link. Tl stands for Template link.
Tl can currently handle 8 additional parameters that are simply displayed as given.
- NOTE
- The equals sign ("=") cannot be included directly because templates use equal signs to delimit named parameters. Replace any equal signs with their HTML entity representation: =.
Usage
{{subst:Tl|template name to display}}
{{tl|template name to display}}
Example
| Code | Result |
|---|---|
{{subst:Tl|Center}}
|
{{Center}} |
{{tl|Userbox Server|Heroes|Freedom}}
|
{{Userbox Server|Heroes|Freedom}} |
{{tl|SlashCommand|command=bind|options=key commands}}
|
{{SlashCommand|command=bind|options=key commands}} |