Template:Collapsed infobox section begin/doc

From Randomdata wiki
Jump to navigation Jump to search

Template:Documentation subpage Template:Template shortcut Template:Collapse Templates This template is used with Template:Tlx to create a collapsed section in an infobox. This is not the same as Template:Tl, which can be used to collapse an infobox, or Template:Tl, which collapses a single list within an infobox.

Usage

Place Template:Tlc before the first line of the collapsed section (typically in the caption, for an infobox with an image), and place Template:Tlc after the last line of the collapsed section (typically just after the website or footnotes).

Parameters

The template has one optional unnamed parameter which is the title used for the collapsed section.

Template:Tlc

If omitted, the template will use the default heading, "Further information".

The template has two optional named parameters for adjusting the style. To change the style for the section title, use Template:Para. To change the style for the collapsed table, use Template:Para.

Setting Template:Para or Template:Para will reduce the margin at the bottom of the section.

Setting Template:Para will inject Template:Tag and Template:Tag tags to fix "linter errors". Typically, this is necessary when the Template:Tlc or Template:Tlc is placed inside of an Template:Tlc caption.

Setting Template:Para will inject a Template:Tag tag before the content in order to fix a different Linter error that can occur when this template is used inside other infobox parameters.

If the hidden content spans three or more columns, set Template:Para or the respective number of columns.

Example

{{#invoke:infobox|infoboxTemplate|child= | bodyclass = biography vcard

| above = {{#if:|

}}

{{#if:Tim Template|Tim Template|Template:PAGENAMEBASE}}

{{#if:|

}}

| abovestyle = font-size:125%;

| subheaderstyle = font-size:125%;

| subheader = {{#switch:|yes=|#default={{#if:|{{#if:|

}}{{{native_name}}}{{#if:|

}} }} }}

| image = {{#invoke:InfoboxImage|InfoboxImage|image=wikipedia.png|size={{#ifeq:|yes|Template:Minx200px|}}|sizedefault=frameless|upright=1|alt=|suppressplaceholder=yes}} | caption = Tim in 2012

{{#if:yes|}}{{#if:|}}

{{#if:yes|
}}
{{{columns}}}|2}}" style="line-height:normal; padding:0.2em; background-color:#eee;" |
Biographical data
label2 = Pronunciation data2 = label10 = Born data10 = Template:Br separated entries z|s}}ed data11 = {{#if:Template:Birth date and age }} label12 = Disappeared data12 = Template:Br separated entries label13 = Status data13 = label14 = Died data14 = Template:Br separated entries label15 = Cause of death data15 = label16 = Body discovered data16 = Burial place|Resting place}} Template:Br separated entries|Template:Br separated entries}} class17 = label label18 = Monuments data18 = label20 = Nationality data20 = class20 = category label21 = Other names data21 = class21 = nickname label22 = Siglum data22 = label23 = Citizenship data23 = class23 = category label24 = Education data24 = label25 = Alma mater data25 = Wikipedia label26 = OccupationTemplate:Pluralize from text data26 = class26 = role label27 = Years active data27 = label28 = Era data28 = class28 = category label29 = EmployerTemplate:Pluralize from text data29 = Template:Main other class29 = org Organisation|Organization}}{{#if:|s|Template:Pluralize from text}} data30 = Template:Main other class30 = org label31 = AgentTemplate:Pluralize from text data31 = Template:Main other class31 = agent label32 = Known for data32 = label33 = Works data33 = label34 = Notable creditTemplate:Pluralize from text data34 = {{#if: Template:Main other}} label35 = LabelTemplate:Pluralize from text data35 = {{#if: Template:Main other}} label36 = Notable work data36 = {{#if: }} label37 = Style data37 = class37 = category label40 = Television data40 = label41 = Height Template:Convinfobox}}{{#if: | Template:Infobox person/height}} Office|Title}} data42 = class42 = title label43 = Term data43 = label44 = Predecessor data44 = label45 = Successor data45 = label46 = Political party data46 = class46 = org label47 = Other political
affiliations
data47 = class47 = org label48 = Movement data48 = class48 = category label49 = OpponentTemplate:Pluralize from text data49 = Template:Main other label50 = Board member of data50 = Criminal charges|Criminal chargeTemplate:Pluralize from text}} data51 = Template:Main other label52 = Criminal penalty data52 = Judicial status|Criminal status}} {{{judicial_status}}} | }} class53 = category s|Template:Pluralize from text}} data54 = Template:Main other s|Template:Pluralize from text}} data55 = Template:Main other label56 = Children data56 = ParentTemplate:Pluralize from text|{{#ifexpr:Template:Count > 1|Parents|{{#if:|Father|{{#if:|Mother}}}}}}}} {{{parents}}}|{{#ifexpr:Template:Count > 1|Template:Unbulleted list|}}}}Template:Main other label58 = Relatives data58 = label59 = Family data59 = label60 = Call sign data60 = label61 = Awards data61 = Honours|Honors}} data62 = data64 = data65 = data66 = data67 = data68 = data69 = label70 = Website data70 = Template:Official website{{#if:||}}

{{#if:|

|}} Template:If empty}} InfoboxImage|image=|size=|class=infobox-signature skin-invert|sizedefault=150px|alt=}} Notes}}
{{{footnotes}}}
}}

}}{{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview = Page using [[Template:{{#if:||Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=n

agent | alias | alma mater | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | birthname | boards | body discovered | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal charge | criminal penalty | criminal status | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death cause | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | honors | honours | image | image caption | image size | image_caption | image_size | image_upright | imagesize | judicial status | judicial_status | known | known for | known_for | label_name | landscape | misc | misc2 | misc3 | misc4 | misc5 | misc6 | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | nationality | native_name | native_name_lang | nickname | nocat_wdimage | notable works | notable_works | occupation | office | opponents | organisation | organization | organizations | other names | other_names | othername | otherparty | parents | partner | partners | partner(s) | party | predecessor | pre-nominals | post-nominals | pronunciation | relations | relatives | resting place | resting place coordinates | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | siglum | signature | signature alt | signature_alt | signature_size | signature_type | spouse | spouses | spouse(s) | status | style | successor | template_name | television | term | title | URL | url | website | works | years active | years_active | yearsactive }}Template:Main other{{#invoke:Check for clobbered parameters|check nested = 1 template = [[Template:{{#if: Infobox person}}]] cat = Template:Main other child; embed honorific prefix; honorific_prefix; honorific-prefix; pre-nominals honorific suffix; honorific_suffix; honorific-suffix; post-nominals image size; image_size; imagesize image caption; caption; image_caption birth_name; birthname baptized; baptised status; disappeared_status death cause; death_cause body discovered; body_discovered resting place; resting_place; restingplace resting place coordinates; resting_place_coordinates; restingplacecoordinates other names; other_names; othername; nickname; alias alma mater; alma_mater years active; years_active; yearsactive organisation; organization; organizations known for= known_for; known works;}} {{#if:|credits;}} {{#if:|label_name;}} notable works; notable_works height_m; height_cm office; title criminal_charges; criminal charge; criminal_charge criminal penalty; criminal_penalty judicial status; judicial_status criminal status; criminal_status spouse; spouses; spouse(s) partner; domesticpartner; domestic_partner; partners; partner(s) {{#if: NULL_}}parents; {{#if: NULL_}}father {{#if: NULL_}}parents; {{#if: NULL_}}mother relations; relatives honours; honors misc; module misc2; module2 misc3; module3 misc4; module4 misc5; module5 misc6; module6 website; homepage; URL; url

}}{{#ifeq:|yes||Template:Wikidata image}} <syntaxhighlight lang="wikitext" style="overflow:auto"> {{#invoke:infobox|infoboxTemplate|child=

bodyclass = biography vcard
}}
{{#if:Tim Template|Tim Template|Template:PAGENAMEBASE}}
{{#if:|
}} abovestyle = font-size:125%; subheaderstyle = font-size:125%; yes=|#default={{#if:|{{#if:|
}}{{{native_name}}}{{#if:|
}} }} }} InfoboxImage|image=wikipedia.png|size={{#ifeq:|yes|Template:Minx200px|}}|sizedefault=frameless|upright=1|alt=|suppressplaceholder=yes}} caption = Tim in 2012 {{#if:yes|

}}{{#if:|}}

{{#if:yes|
}}
{{{columns}}}|2}}" style="line-height:normal; padding:0.2em; background-color:#eee;" |
Biographical data
label2 = Pronunciation data2 = label10 = Born data10 = Template:Br separated entries z|s}}ed data11 = {{#if:Template:Birth date and age }} label12 = Disappeared data12 = Template:Br separated entries label13 = Status data13 = label14 = Died data14 = Template:Br separated entries label15 = Cause of death data15 = label16 = Body discovered data16 = Burial place|Resting place}} Template:Br separated entries|Template:Br separated entries}} class17 = label label18 = Monuments data18 = label20 = Nationality data20 = class20 = category label21 = Other names data21 = class21 = nickname label22 = Siglum data22 = label23 = Citizenship data23 = class23 = category label24 = Education data24 = label25 = Alma mater data25 = Wikipedia label26 = OccupationTemplate:Pluralize from text data26 = class26 = role label27 = Years active data27 = label28 = Era data28 = class28 = category label29 = EmployerTemplate:Pluralize from text data29 = Template:Main other class29 = org Organisation|Organization}}{{#if:|s|Template:Pluralize from text}} data30 = Template:Main other class30 = org label31 = AgentTemplate:Pluralize from text data31 = Template:Main other class31 = agent label32 = Known for data32 = label33 = Works data33 = label34 = Notable creditTemplate:Pluralize from text data34 = {{#if: Template:Main other}} label35 = LabelTemplate:Pluralize from text data35 = {{#if: Template:Main other}} label36 = Notable work data36 = {{#if: }} label37 = Style data37 = class37 = category label40 = Television data40 = label41 = Height Template:Convinfobox}}{{#if: | Template:Infobox person/height}} Office|Title}} data42 = class42 = title label43 = Term data43 = label44 = Predecessor data44 = label45 = Successor data45 = label46 = Political party data46 = class46 = org label47 = Other political
affiliations
data47 = class47 = org label48 = Movement data48 = class48 = category label49 = OpponentTemplate:Pluralize from text data49 = Template:Main other label50 = Board member of data50 = Criminal charges|Criminal chargeTemplate:Pluralize from text}} data51 = Template:Main other label52 = Criminal penalty data52 = Judicial status|Criminal status}} {{{judicial_status}}} | }} class53 = category s|Template:Pluralize from text}} data54 = Template:Main other s|Template:Pluralize from text}} data55 = Template:Main other label56 = Children data56 = ParentTemplate:Pluralize from text|{{#ifexpr:Template:Count > 1|Parents|{{#if:|Father|{{#if:|Mother}}}}}}}} {{{parents}}}|{{#ifexpr:Template:Count > 1|Template:Unbulleted list|}}}}Template:Main other label58 = Relatives data58 = label59 = Family data59 = label60 = Call sign data60 = label61 = Awards data61 = Honours|Honors}} data62 = data64 = data65 = data66 = data67 = data68 = data69 = label70 = Website data70 = Template:Official website{{#if:||}}

{{#if:|

|}} Template:If empty}} InfoboxImage|image=|size=|class=infobox-signature skin-invert|sizedefault=150px|alt=}} Notes}}
{{{footnotes}}}
}}

}}{{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview = Page using [[Template:{{#if:||Infobox person}}]] with unknown parameter "_VALUE_"|ignoreblank=n

agent | alias | alma mater | alma_mater | alt | awards | baptised | baptized | birth_date | birth_name | birth_place | birthname | boards | body discovered | body_discovered | burial_coordinates | burial_place | callsign | caption | child | children | citizenship | credits | criminal charge | criminal penalty | criminal status | criminal_charge | criminal_charges | criminal_penalty | criminal_status | death cause | death_cause | death_date | death_place | disappeared_date | disappeared_place | disappeared_status | domestic_partner | domesticpartner | education | embed | employer | era | family | father | footnotes | height | height_cm | height_ft | height_in | height_m | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | honorific-prefix | honorific-suffix | honors | honours | image | image caption | image size | image_caption | image_size | image_upright | imagesize | judicial status | judicial_status | known | known for | known_for | label_name | landscape | misc | misc2 | misc3 | misc4 | misc5 | misc6 | module | module2 | module3 | module4 | module5 | module6 | monuments | mother | movement | name | nationality | native_name | native_name_lang | nickname | nocat_wdimage | notable works | notable_works | occupation | office | opponents | organisation | organization | organizations | other names | other_names | othername | otherparty | parents | partner | partners | partner(s) | party | predecessor | pre-nominals | post-nominals | pronunciation | relations | relatives | resting place | resting place coordinates | resting_place | resting_place_coordinates | restingplace | restingplacecoordinates | siglum | signature | signature alt | signature_alt | signature_size | signature_type | spouse | spouses | spouse(s) | status | style | successor | template_name | television | term | title | URL | url | website | works | years active | years_active | yearsactive }}Template:Main other{{#invoke:Check for clobbered parameters|check nested = 1 template = [[Template:{{#if: Infobox person}}]] cat = Template:Main other child; embed honorific prefix; honorific_prefix; honorific-prefix; pre-nominals honorific suffix; honorific_suffix; honorific-suffix; post-nominals image size; image_size; imagesize image caption; caption; image_caption birth_name; birthname baptized; baptised status; disappeared_status death cause; death_cause body discovered; body_discovered resting place; resting_place; restingplace resting place coordinates; resting_place_coordinates; restingplacecoordinates other names; other_names; othername; nickname; alias alma mater; alma_mater years active; years_active; yearsactive organisation; organization; organizations known for= known_for; known works;}} {{#if:|credits;}} {{#if:|label_name;}} notable works; notable_works height_m; height_cm office; title criminal_charges; criminal charge; criminal_charge criminal penalty; criminal_penalty judicial status; judicial_status criminal status; criminal_status spouse; spouses; spouse(s) partner; domesticpartner; domestic_partner; partners; partner(s) {{#if: NULL_}}parents; {{#if: NULL_}}father {{#if: NULL_}}parents; {{#if: NULL_}}mother relations; relatives honours; honors misc; module misc2; module2 misc3; module3 misc4; module4 misc5; module5 misc6; module6 website; homepage; URL; url

}}{{#ifeq:|yes||Template:Wikidata image}} </syntaxhighlight>

Warnings

If either the begin or end templates are not properly transcluded, disaster may strike, causing the infobox to either swallow the article (missing the end template), or terminate unexpectedly (missing the begin template).

When biographical infoboxes include the subject's signature, the signature cannot be inside the collapsed portion. If either Template:Para or Template:Para are included between the begin and end templates, the infobox will swallow the article.

As with all collapsed content, if there are references to citations (<ref>...</ref>) inside collapsible sections, readers cannot jump to the location of the reference using the backlinks (^ or Template:VarTemplate:Sup) at the citation. Backlinks will only work when the collapsible section(s) is/are expanded. The same is true for citations within a collapsed Template:Tl or Template:Tl template or any collapsed content.

See also