Template:Userbox table userbox/doc: Difference between revisions
imported>Deadfire |
Tungstenchan (talk | contribs) m Text replacement - "BattleTechWiki" to "BattleIntelligence" |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
{{Lua|Module:Template wrapper}} | {{Lua|Module:Template wrapper}} | ||
The following ten [[ | The following ten [[BattleIntelligence:Userboxes|userbox]] [[Help:Table|table]] [[Help:Template|templates]] can be used to create a userbox table that displays a list of userboxes along with their invoking [[Help:Wikitext|Wikitext]] and a link to a list of the pages that invoke each userbox template. Templates can also display text and boxes that link to pages, sections, [[Help:Categories|categories]], [[BattleIntelligence:WikiProjects|projects]], and [[BattleIntelligence:Portal|portals]]. | ||
#[[Template:Userbox table userbox/doc#Userbox table top|Userbox table top]] | #[[Template:Userbox table userbox/doc#Userbox table top|Userbox table top]] | ||
#[[Template:Userbox table userbox/doc#Userbox table userbox|Userbox table userbox]] | #[[Template:Userbox table userbox/doc#Userbox table userbox|Userbox table userbox]] | ||
| Line 31: | Line 31: | ||
Note: Template:Userbox table top is very similar to [[Template:Usbktop]] except: | Note: Template:Userbox table top is very similar to [[Template:Usbktop]] except: | ||
# Template:Userbox table top default sizes the three columns to 390, 250, and 80 pixels respectively.<br>Template:Usbktop does no default column sizing. | # Template:Userbox table top default sizes the three columns to 390, 250, and 80 pixels respectively.<br>Template:Usbktop does no default column sizing. | ||
# Template:Userbox table top places the linked labels '''''[[Wiki#Editing|<span style="font-size:80%">Wiki markup</span>]]''''', '''''[[ | # Template:Userbox table top places the linked labels '''''[[Wiki#Editing|<span style="font-size:80%">Wiki markup</span>]]''''', '''''[[BattleIntelligence:Userboxes|<span style="font-size:80%">userbox</span>]]''''', and '''''[[BattleIntelligence:User pages|<span style="font-size:80%">where used</span>]]''''' centered at the top of each column.<br>Template:Usbktop places the labels '''Code''' and '''Result''' left justified at the top of the first two columns only. | ||
# Template:Userbox table top may be used to create a centered table title. | # Template:Userbox table top may be used to create a centered table title. | ||
--> | --> | ||
| Line 60: | Line 60: | ||
#Template:Userbox table userbox will pass up to 12 parameters to the called template.<br>Template:Usbk will pass no more than three parameters to the called template. | #Template:Userbox table userbox will pass up to 12 parameters to the called template.<br>Template:Usbk will pass no more than three parameters to the called template. | ||
#Template:Userbox table userbox forces all cells to align to the left.<br>Template:Usbk uses the default object alignment. | #Template:Userbox table userbox forces all cells to align to the left.<br>Template:Usbk uses the default object alignment. | ||
#Template:Userbox table userbox uses the same [[ | #Template:Userbox table userbox uses the same [[BattleIntelligence:Category suppression|category suppression]] as [[Template:Usbk]]. --> | ||
==Userbox table category== | ==Userbox table category== | ||
| Line 108: | Line 108: | ||
where: | where: | ||
*'''''<code>name</code>''''' is the required name of a country, region, WikiProject, portal, or noticeboard. (See [[Module:Portal/images]]) | *'''''<code>name</code>''''' is the required name of a country, region, WikiProject, portal, or noticeboard. (See [[Module:Portal/images]]) | ||
*'''''<code>page</code>''''' is the optional page name of the subtable. (default= | *'''''<code>page</code>''''' is the optional page name of the subtable. (default=BattleIntelligence:Userboxes/Location/'''<code>name</code>''') | ||
*'''<code>desc=</code>''' is the optional description of the subtable. (default='''<code>name</code>''' userbox templates) | *'''<code>desc=</code>''' is the optional description of the subtable. (default='''<code>name</code>''' userbox templates) | ||
*'''<code>image=</code>''' is the optional image file. (default image file from [[Module:Portal/images]]) | *'''<code>image=</code>''' is the optional image file. (default image file from [[Module:Portal/images]]) | ||
| Line 123: | Line 123: | ||
{{clear}} | {{clear}} | ||
'''<code><nowiki>{{Userbox table link|Music composers| | '''<code><nowiki>{{Userbox table link|Music composers|BattleIntelligence:Userboxes/Music/Composers|image=P treble clef.svg|sixe=41px|alone=yes}}</nowiki></code>''' creates:<br> | ||
{{Userbox table link|Music composers| | {{Userbox table link|Music composers|BattleIntelligence:Userboxes/Music/Composers|image=P treble clef.svg|sixe=41px|alone=yes}} | ||
{{clear}} | {{clear}} | ||
<!-- | <!-- | ||
| Line 156: | Line 156: | ||
==Userbox table project link== | ==Userbox table project link== | ||
[[Template:Userbox table project link]] (formerly [[Template:yywp]]) creates a link to a [[ | [[Template:Userbox table project link]] (formerly [[Template:yywp]]) creates a link to a [[BattleIntelligence:WikiProject|WikiProject]], [[BattleIntelligence:WikiProject Council/Guide/Task forces|Work Group]], or [[BattleIntelligence:WikiProject Council/Guide/Task forces|Task Force]]. | ||
'''<samp><nowiki>{{Userbox table project link|</nowiki>''wikiproject''<nowiki>|</nowiki>''group''<nowiki>|</nowiki>''type''<nowiki>|</nowiki>''label''<nowiki>|folder=|size=}}</nowiki></samp>''' | '''<samp><nowiki>{{Userbox table project link|</nowiki>''wikiproject''<nowiki>|</nowiki>''group''<nowiki>|</nowiki>''type''<nowiki>|</nowiki>''label''<nowiki>|folder=|size=}}</nowiki></samp>''' | ||
where: | where: | ||
| Line 177: | Line 177: | ||
==Userbox table portal link== | ==Userbox table portal link== | ||
[[Template:Userbox table portal link]] (formerly [[Template:yyp]]) creates a link to a [[ | [[Template:Userbox table portal link]] (formerly [[Template:yyp]]) creates a link to a [[BattleIntelligence:Portal|portal]]. | ||
'''<samp><nowiki>{{Userbox table portal link|</nowiki>''portal''<nowiki>|size=}}</nowiki></samp>''' | '''<samp><nowiki>{{Userbox table portal link|</nowiki>''portal''<nowiki>|size=}}</nowiki></samp>''' | ||
where: | where: | ||
| Line 203: | Line 203: | ||
==See also== | ==See also== | ||
* For help with userbox templates see [[ | * For help with userbox templates see [[BattleIntelligence:WikiProject Userboxes|Wikiproject Userboxes]]. | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
[[Category:Userbox arrangement templates]] | [[Category:Userbox arrangement templates]] | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 01:16, 1 May 2025
| This is a documentation subpage for Template:Userbox table userbox. It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
The following ten userbox table templates can be used to create a userbox table that displays a list of userboxes along with their invoking Wikitext and a link to a list of the pages that invoke each userbox template. Templates can also display text and boxes that link to pages, sections, categories, projects, and portals.
- Userbox table top
- Userbox table userbox
- Userbox table category
- Userbox table text
- Userbox table link
- Userbox table regional link
- Userbox table project link
- Userbox table portal link
- Userbox table noticeboard link
- Userbox table bottom
See the userbox table example below to see how these templates work together.
Userbox table top
Template:Userbox table top (formerly Template:yytop) always comes first in a userbox table to create the three column headings and to size the columns. It may also be used to create a centered table title.
{{Userbox table top|title|headers=}}
where:
titleis the optional table title.headers=is the optional column headings switch.headers=yescreates three column headings (default)headers=nocreates no column headings.
Example:
{{Userbox table top|Userbox Templates}} creates:
| Wikitext | userbox | where used |
|---|
Userbox table userbox
Template:Userbox table userbox (formerly Template:yy) creates a single row in the userbox table with the userbox Wikitext, the userbox, and a link to the list of pages that link to the userbox template.
{{Userbox table|template|par1|...|par12|comment=}}
where:
templateis the required template name.par1|...|par12are up to 12 optional template parameters.comment=is an optional comment.
A zero-width space ​ may be used to represent a missing parameter.
Examples:
{{Userbox table userbox|User Senior editor}} creates:
{{User Senior editor}}
|
linked pages |
{{Userbox table userbox|User Discord|account=username|comment=account=username}} creates:
{{User Discord
|
|
linked pages account=username |
Userbox table category
Template:Userbox table category (formerly Template:yycat) creates a link to a category. This may be used to show how to link to a category without using a userbox.
{{Userbox table category|category|link=}}
where:
categoryis the required category name.link=is the optional link to the category. (default=no)
Example:
{{Userbox table category|Editors in South Africa|link=yes}} creates:
| [[Category:Editors in South Africa]] | none | linked pages |
Userbox table text
Template:Userbox table text (formerly Template:yytxt) creates a row of text in the userbox table.
{{Userbox table text|txt1|txt2|txt3|opt=}}
where:
txt1is the optional text for the table or first column.txt2is the optional text for the second columntxt3is the optional text for the third columnopt=is the optional format parameter:opt=1creates a line of left-justified text (default)opt=2creates a line of table-centered textopt=3creates a line of right-justified textopt=4creates a line of left-justified text for each columnopt=5creates a line of column-centered text for each columnopt=6creates a line of right-justified text for each columnopt=7recreates the column headings of Template:Yytop
If all three optional text parameters are blank or missing, a blank row will be inserted.
Example:
{{Userbox table text|Residence:}} creates:
| Residence: | ||
Userbox table link
Template:Userbox table link (formerly Template:yytab) creates a link to another table. It may be used to break an overly large table into subtables.
{{Userbox table link|name|page|desc=|image=|size=|id-w=|info-s=|alone=}}
where:
nameis the required name of a country, region, WikiProject, portal, or noticeboard. (See Module:Portal/images)pageis the optional page name of the subtable. (default=BattleIntelligence:Userboxes/Location/name)desc=is the optional description of the subtable. (default=nameuserbox templates)image=is the optional image file. (default image file from Module:Portal/images)size=is the optional image size. (default=x45px)id-w=is the optional image space width. (default=45)info-s=is the optional font size. (default=9)alone=is the optional stand alone switch.alone=nopointer is part of a table. (default)alone=yespointer in its own table.
Examples:
{{Userbox table link|France|alone=yes}} creates:
| See BattleIntelligence:Userboxes/ |
{{Userbox table link|Music composers|BattleIntelligence:Userboxes/Music/Composers|image=P treble clef.svg|sixe=41px|alone=yes}} creates:
| See BattleIntelligence:Userboxes/ |
Userbox table regional link
Template:Userbox table regional link (formerly Template:yyreg) creates a link to a city or regional table.
{{Userbox table regional link|name|separator|subsection|text=|image=|info-s=|plain=|alone=}}
where:
nameis the required name of a nation or region. (See Module:Portal/images)separatoris the optional separator.#for a section. (default)/for a subpage.
subsectionis the optional section or subpage. (default=Cities)text=is the optional text. (default=<subsection> of <name>.)image=is the optional image file. (default image file from Module:Portal/images)info-s=is the optional font size. (default=9)plain=is an optional switchplain=nouse separator and subsection. (default)plain=yesignore separator and subsection.
alone=is the optional stand alone switch.alone=nopointer is part of a table. (default)alone=yespointer in its own table.
Example:
{{Userbox table regional link|Puerto Rico|alone=yes}} creates:
| See BattleIntelligence:Userboxes/ |
Note: See Template:Userbox table regional link for additional information.
Userbox table project link
Template:Userbox table project link (formerly Template:yywp) creates a link to a WikiProject, Work Group, or Task Force.
{{Userbox table project link|wikiproject|group|type|label|folder=|size=}}
where:
wikiprojectis the required WikiProject base name.groupan optional project group base name if any.typean optional project group type if any.labelan optional WikiProject box label. (default=WikiProjectwikiprojectorgrouptype)folder=is an optional WikiProject folder name.size=is the optional image size. (default=x45px)
Examples:
{{Userbox table project link|Templates}} creates:
| [[BattleIntelligence:WikiProject Templates]] | linked pages |
Userbox table portal link
Template:Userbox table portal link (formerly Template:yyp) creates a link to a portal.
{{Userbox table portal link|portal|size=}}
where:
portalis the required portal name.size=is the optional image size. (default=x45px)
Example:
{{Userbox table portal link|South Africa}} creates:
Userbox table bottom
Template:Userbox table bottom (formerly Template:yyend) always comes last and completes the userbox table.
{{Userbox table bottom|comment}}
where:
commentis an optional comment to appear at the bottom right of the table.
See also
- For help with userbox templates see Wikiproject Userboxes.