Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Bracket/doc
(section)
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
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!
== Adding new templates == New templates can be added using the following format: <syntaxhighlight lang="lua">p['TEMPLATE_NAME'] = function (frame) return p._teamBracket(frame, 'TEMPLATE_NAME', {ALTERNATIVE_PARAMETER_NAMES}, {PARAMETER_DEFAULTS}) end</syntaxhighlight> * '''TEMPLATE_NAME''' is the name of the template without "Template:" * '''ALTERNATIVE_PARAMETER_NAMES''' is an array of custom parameters and the standard parameter of [[Module:Team bracket]] that they translate to, in the form <syntaxhighlight lang="lua" inline>CUSTOM_NAME = "STANDARD_NAME"</syntaxhighlight>. For example, a template that uses <syntaxhighlight lang="wikitext" inline>|RD1-group1 = {{{RD1-group1|{{{group1|}}}}}}</syntaxhighlight> would have <syntaxhighlight lang="lua" inline>group1 = "RD1-group1"</syntaxhighlight>. Any parameters that start with a number or contain a dash need to be specified as <syntaxhighlight lang="lua" inline>['CUSTOM_NAME']</syntaxhighlight>, e.g. <syntaxhighlight lang="lua" inline>['RD1-seed01'] = 'RD1-seed1'</syntaxhighlight>. * '''PARAMETER_DEFAULTS''' is an array of default parameter values that are used if a parameter is not specified. For example, a template that uses <syntaxhighlight lang="wikitext" inline>|RD1 = Quarterfinals</syntaxhighlight> would have <syntaxhighlight lang="lua" inline>RD1 = "Quarterfinals"</syntaxhighlight>, or a template that uses <syntaxhighlight lang="wikitext" inline>|team-width = {{{team-width|125}}}</syntaxhighlight> would have <syntaxhighlight lang="lua" inline>['team-width'] = "125"</syntaxhighlight>. Some parameters are automatically determined based on ''TEMPLATE-NAME'' unless explicity specified in ''PARAMETER_DEFAULTS'': ** <code>rounds</code> is automatically calculated based on the <code>##Team</code> or <code>##Round</code> text present in ''TEMPLATE-NAME''. This does not need to be specified. ** Templates with <code>-Tennis##</code> or <code>-Squash##</code> in ''TEMPLATE-NAME'' will have <code>sets</code> set to the value of <code>##</code>. In addition, these templates will have <syntaxhighlight lang="lua" inline>{seeds = "yes", nowrap = "yes"}</syntaxhighlight> set. ** Templates with <code>-Compact</code> in ''TEMPLATE-NAME'' will automatically default to <syntaxhighlight lang="lua" inline>compact = "yes"</syntaxhighlight> <noinclude> [[Category:Module documentation pages]] </noinclude>
Summary:
Please note that all contributions to Humanipedia 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
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)