Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Tlx/doc
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!
{{Module rating | alpha }} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> == Usage == <code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''|SISTER=''sister project name''}}</code> Implements a version of {{tl|tlx}}, {{tl|tlxs}}, {{tl|tlxb}}, {{tl|tlxi}}, {{tl|tlxc}}, and {{tl|temt}}. {{tl|tlx}} and {{tl|temt}} use the function name <code>tlx</code>, {{tl|tlxs}} uses <code>tlxs</code>, {{tl|tlxb}} uses <code>tlxb</code>, {{tl|tlxi}} uses <code>tlxi</code>, and {{tl|tlxs}} uses <code>tlx</code> with {{para|SISTER|commons:}}. Generally, a call to this module can be placed at the front of a template call to display formatted code instead of the template output. For example, if this module is implemented at {{tl|tlx/sandbox}}, a function call such as <code><nowiki>{{convert|1|m|disp=flip}}</nowiki></code> can be displayed as formatted text using the code <code><nowiki>{{tlx/sandbox|convert|1|m|disp=flip}}</nowiki></code>, which outputs {{tlx/sandbox|convert|1|m|disp=flip}}. This has the following caveats: *{{para|LANG}}, {{para|SISTER}}, and {{para|subst}} are reserved for compatibility with the legacy {{tl|tlx}} template. In order to display <code><nowiki>{{x0|LANG=de|SISTER=wikt|subst=yes}}</nowiki></code> you would need to use workarounds from the old template such as <code><nowiki>{{tlx/sandbox|x0|<nowiki>LANG=en</nowiki>|SISTER{{=}}wikt|4=subst=yes}}</nowiki></code> to produce {{tlx/sandbox|x0|<nowiki>LANG=en</nowiki>|SISTER{{=}}wikt|4=subst=yes}}. *Parameters are presented in alphabetical order, starting with numbered parameters, regardless of input order. <code><nowiki>{{tlx/sandbox|x0|z=y|x=w|a|b}}</nowiki></code> displays {{tlx/sandbox|x0|z=y|x=w|a|b}} *Since the {{para|1}} parameter is used for the template name, numbered parameters where the number is explicitly specified must be offset by one (as was true with the legacy {{tl|tlx}} template): <code><nowiki>{{tlx/sandbox|x0|2=first|3=second|4=third=***}}</nowiki></code> produces {{tlx/sandbox|x0|2=first|3=second|4=third=***}}. :*NOTE: you must be careful not to double-define a parameter. <code><nowiki>{{tlx/sandbox|x0|first|2=second=**}}</nowiki></code> will output {{tlx/sandbox|x0|2=second=**}} (and generate a warning) since the <code>2</code> parameter was defined twice. Use <code><nowiki>{{tlx/sandbox|x0|first|3=second=**}}</nowiki></code> to display {{tlx/sandbox|x0|first|3=second=**}}. *To display the number of a numbered parameter explicitly, the same workarounds from the legacy template still work: <code><nowiki>{{tlx/sandbox|x0|<nowiki>1=first</nowiki>|2{{=}}second|4=3=third}}</nowiki></code> produces {{tlx/sandbox|x0|<nowiki>1=first</nowiki>|2{{=}}second|4=3=third}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Module rating
(
edit
)
Template:Para
(
edit
)
Template:Tl
(
edit
)
Template:Tlx/sandbox
(
edit
)