Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Announcements
Random page
Help about MediaWiki
SPS Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Editing
Template
:
Tlx/doc
Template
Discussion
Canadian English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
Special pages
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This is a template link with a variable number of example parameters (0β30), which can be used to show example inputs. == Syntax == === Parameters === ;First parameter :The link to the template. Defaults to the page name (current page name: '''{{PAGENAME}}''') ;2nd to 31st parameter :The parameters of the template. :To add named parameters, example <code><nowiki>{{notice|1st parameter|2nd parameter|3=3rd parameter}}</nowiki></code>, follow these steps: :# Write the parameter normally. Example: <code><nowiki>{{tlx|notice|1st parameter|2nd parameter|3=3rd parameter}}</nowiki></code>. :# Then, count how many parameters you have added, so <code>{<nowiki/>{t|''notice''|''1st parameter''|''2nd parameter''|'''3=3rd parameter'''}}</code>. <br/> On this example, there are '''4''' parameters, so prefix <code>4=</code> on the {{tlx|tlx}} template. :# So, the code is <code>{<nowiki/>{t|notice|1st parameter|2nd parameter|'''''4='''=3=3rd parameter''}}</code>, which results in {{tlx|notice|1st parameter|2nd parameter|4=3=3rd parameter}}. :Note: Adding named parameters will force you to always prefix the unnamed parameter: ::<code><nowiki>{{tlx|notice|1st parameter|2nd parameter|4=3=3rd parameter|4th parameter}}</nowiki></code> will '''not work''' ::<code><nowiki>{{tlx|notice|1st parameter|2nd parameter|4=3=3rd parameter|5=4th parameter}}</nowiki></code> '''will work'''. ---- The following will only work after all the parameters of the demo template is placed.<br/> '''Wrong''': <nowiki>{{tlx|notice|style=code|<message>}}</nowiki><br/> '''Right''': <nowiki>{{tlx|notice|<message>|style=code}}</nowiki> ;Style (<code>style=</code>) :The style of the {{tlx|tlx}} template. Has 1 style: :* <code>code</code>, which encloses the {{tlx|tlx}} template with <code><nowiki><code></nowiki></code> ;Prefix (<code>prefix=</code>) :The prefix for the template, useful when instructing the user to add <code>subst</code>, <code>safesubst</code>, or something similar. :Note: This '''does not''' add a prefix to the link. Use <code>linkprefix</code> instead as listed below. ;Link Prefix (<code>linkprefix=</code>) :The prefix for the link itself, for linking to other languages/wikis. Also shows in the template link. :Note: This adds the prefix to the link itself. To add a prefix not included on the link, see above. ;Block Mode (<code>block=</code>) :Makes the template styled as a block template, to aid in readability. Combine with <code>style=code</code> to get the best results. === Sample code === {| class="wikitable" !Syntax !Output |- |<code><nowiki>{{tlx}}</nowiki></code> |{{tlx}} (uses the page name) |- |<code><nowiki>{{tlx|notice}}</nowiki></code> |{{tlx|notice}} |- |<code><nowiki>{{tlx|notice|Item1|Item2|Item3|Item4|Item5|...}}</nowiki></code> |{{tlx|notice|Item1|Item2|Item3|Item4|Item5|...}} |- |<code><nowiki>{{tlx|notice|2=param1=Item1}}</nowiki></code> |{{tlx|notice|2=param1=Item1}} |- |<code><nowiki>{{tlx|notice|prefix=subst}}</nowiki></code> |{{tlx|notice|prefix=subst}} |- |<code><nowiki>{{tlx|notice|linkprefix=wp}}</nowiki></code> |{{tlx|notice|linkprefix=wp}} |- |<code><nowiki>{{tlx|notice|style=code}}</nowiki></code> |{{tlx|notice|style=code}} |- |<code><nowiki>{{tlx|notice|2=Item1|3=Item2|4=Item3|block=true}}</nowiki></code> |{{tlx|notice|2=Item1|3=Item2|4=Item3|block=true}} |} === Full usage === <code><nowiki> {{tlx|notice|2=param1=Item1|3=param2=Item2|4=param3=Item3<br/>...|5=param10=Item10|block=true|style=code|prefix=subst}} </nowiki></code> {{tlx|notice|2=param1=Item1|3=param2=Item2|4=param3=Item3<br/>...|5=param10=Item10|block=true|style=code|prefix=subst}} <includeonly> [[Category:Formatting and function templates]] </includeonly>
Summary:
Please note that all contributions to SPS Wiki are considered to be released under the CC-BY-SA license. If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, copied it from a public domain or similar free resource, are quoting material from elsewhere within a sufficiently limited scope to qualify as fair use, or are using material from SPS' games within the scope of our content policy.
Cancel
Editing help
(opens in new window)
Page included on this page:
Template:Tlx
(
edit
)
Search
Search
Editing
Template
:
Tlx/doc
Add topic