Difference between revisions of "Template:Floruit/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Nøkkenbuer
m (spacing)
 
(54 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<!--Begin {{floruit}}.--><includeonly>{{#if:{{{wrap|}}}|{{#ifeq:{{{wrap|}}}|yes||{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the wrap option&#93;}}}}&#32;}}|<span style="white-space:nowrap;">}}{{#if:{{{b|}}}|{{#if:{{{1|{{{date|}}}}}}|{{#ifeq:{{{b|}}}|yes|&#40;|{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the bracket option&#93;}}}}&#32;}}|{{error|message={{small|&#91;error in template {{tl2|floruit}}: bracket option requires a date value&#93;}}}}&#32;}}|}}{{#if:{{{pfx1|}}}|{{#ifeq:{{{pfx1|}}}|italics|<em>|{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the prefix-style option&#93;}}}}&#32;}}}}{{#if:{{{pfx2|{{{lk|}}}}}}|{{#switch:{{{pfx2|{{{lk|}}}}}}|no|off=fl.|abbr={{abbr|fl.|floruit}}|{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the prefix-link option&#93;}}}}}}|[[Floruit|fl.]]}}{{#ifeq:{{{pfx1|}}}|italics|</em>}}{{#if:{{{ca|}}}|{{#if:{{{2|{{{date2|}}}}}}|{{#switch:{{{ca|}}}|both|yes|date=&#8239;c.|}}|{{#switch:{{{ca|}}}|yes|date=&#8239;c.|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the circa option&#93;}}}}}}|}}}}{{#if:{{{sortable|}}}|{{#if:{{{1|{{{date|}}}}}}|{{#ifeq:{{{sortable|}}}|yes|&#8239;{{#iferror:{{dts|{{{1|{{{date|}}}}}}}}|{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong date format for the sortable option&#93;}}}}}}|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the sortable option&#93;}}}}}}|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: sortable option requires a date value&#93;}}}}}}|&#8239;{{trim|{{{1|{{{date|}}}}}}}}}}{{#if:{{{unit|}}}|{{#if:{{{1|{{{date|}}}}}}|{{#if:{{{2|{{{date2|}}}}}}|{{#switch:{{{unit|}}}|c-c=&#160;century|m-m=&#160;millennium}}|{{#switch:{{{unit|}}}|c=&#160;century|m=&#160;millennium|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the time-unit option&#93;}}}}}}}}|{{error|message={{small|&#91;error in template {{tl2|floruit}}: time-unit option requires a date value&#93;}}}}}}}}{{#if:{{{sfx|}}}|{{#if:{{{1|{{{date|}}}}}}|{{#if:{{{2|{{{date2|}}}}}}|{{#switch:{{{sfx|}}}|b-a=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Anno Domini|BC]]|BC}}|bce|b-c=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Common Era|BCE]]|BCE}}}}|{{#switch:{{{sfx|}}}|ad=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Anno Domini|AD]]|AD}}|bc=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Anno Domini|BC]]|BC}}|bce=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Common Era|BCE]]|BCE}}|ce=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Common Era|CE]]|CE}}|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong or unsupported suffix&#93;}}}}}}}}|{{error|message={{small|&#91;error in template {{tl2|floruit}}: suffix option requires a date value&#93;}}}}}}|{{#if:{{{sfx-lk|}}}|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: suffix link requires suffix&#93;}}}}}}}}{{#if:{{{2|{{{date2|}}}}}}|{{#if:{{{1|{{{date|}}}}}}|&#160;&#8211;&#32;{{#switch:{{{ca|}}}|date2|both=c.&#8239;|}}{{trim|{{{2|{{{date2|}}}}}}}}{{#if:{{{unit|}}}|{{#switch:{{{unit|}}}|c|c-c=&#160;century|m|m-m=&#160;millennium|&#32;{{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the time-unit option&#93;}}}}}}}}{{#if:{{{sfx|}}}|{{#switch:{{{sfx|}}}|ad|b-a=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Anno Domini|AD]]|AD}}|bc=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Anno Domini|BC]]|BC}}|bce=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Common Era|BCE]]|BCE}}|ce|b-c=&#160;{{#ifeq:{{{sfx-lk|}}}|yes|[[Common Era|CE]]|CE}}|{{error|message=&#32;{{small|&#91;error in template {{tl2|floruit}}: wrong or unsupported suffix&#93;}}}}}}}}|{{error|message=&#32;{{small|&#91;error in template {{tl2|floruit}}: date range requires a starting date&#93;}}}}}}}}{{#if:{{{1|{{{date|}}}}}}|{{#ifeq:{{{b|}}}|yes|&#41;}}}}{{#ifeq:{{{wrap|}}}|yes||</span>}}</includeonly><!--End {{floruit}}.--><noinclude>
+
{{#if:{{{sortable|}}}
 
+
|<span style="display:none;">{{{1|}}}</span>
{{floruit/sandbox|2010s}}<br/>
+
}}{{#if:{{{i|}}}
{{floruit/sandbox|2010s|b=yes}}<br/>
+
|<nowiki/>''
{{floruit/sandbox|21st|b=yes|unit=c|sfx=bc|sfx-lk=yes|ca=yes}}<br/>
+
}}{{#switch:{{{lk|}}}
{{floruit/sandbox|200|200|sfx=b-c|sfx-lk=yes|b=yes|sortable=yes}}<br/>
+
|no|off       = fl.
{{floruit/sandbox|2000|2016}}<br/>
+
|yes|on       = [[Floruit|fl.]]
{{floruit/sandbox|2000|2016|ca=date}}<br/>
+
|abbr
{{floruit/sandbox|20th|21st|unit=c|b=yes}}<br/>
+
|#default      = {{Abbr|fl.|floruit}}
{{floruit/sandbox|20th|21st|ca=date2|unit=c|sfx=ad|sfx-lk=yes|b=yes}}<br/>
+
}}{{#if:{{{i|}}}
{{floruit/sandbox|2nd|2nd|ca=both|unit=c-c|sfx=b-a|b=yes}}<br/>
+
|''<nowiki/>
{{floruit/sandbox|2nd|2nd|ca=date|unit=m-m|sfx=b-c|sfx-lk=yes|b=yes}}<br/>
+
}}{{#if:{{{1|}}}
{{Documentation|content=
+
|<span style="white-space:nowrap;">&thinsp;{{{1}}}</span>
<!--Categories go at the bottom of this page and interwikis go in Wikidata.-->
+
}}{{#if:{{{2|}}}
<!--Partly based on documentation for {{cl|Citation Style 1 templates}}.-->
+
|&nbsp;{{Abbr|c.|circa}}<span style="white-space:nowrap;">&thinsp;{{{2}}}</span>
{{ombox|textstyle=font-weight:bold;font-style:italic;|text=To quickly become familiar with this template, see {{slink||TemplateData}} (as usage summary), and {{slink||Examples}}.}}
+
}}<noinclude>
The template {{bxtn|floruit}} (or [[#Redirects|any of its aliases]]) may be used to format the display of time periods or eras during which people, ideas, theories, or political, cultural or religious movements etc., may have been active or popular. It utilizes "fl.", an abbreviation of ''[[floruit]]'' or "flourished" (in [[Latin]]), as a prefix to the relevant date(s). The prefix abbreviation is wikilinked to floruit by default, but users may employ different or additional display options. Please also see {{slink||Exceptions}} for possible usage exceptions.
+
{{Documentation}}
 
 
==Usage==
 
 
 
===Structure===
 
For presentation purposes only, in the box below [brackets] indicate parameter values; variables are {{em|italicized}}; explanatory text is in (parentheses).
 
{{csdoc|usage full}}
 
:<code><nowiki>{{floruit|date= (or) </nowiki>[{{var|date-value}}]<nowiki>|date2= (or) </nowiki>[{{var|end-date-value}}]<nowiki>|b= |ca= |pfx1= |pfx2= |unit= |sfx= |sfx-lk= |sortable= |wrap= }}</nowiki></code>
 
{{end}}
 
Copy a blank version to use. All parameter names must be in lowercase. Use the "{{!}}" (pipe) character between each parameter. Leading and trailing spaces (&#160;) are trimmed from parameter values; therefore, parameters will not display if they are only populated by spaces. Misspelled or undefined parameters are ignored. Delete unused parameters or options, and explanatory text. See {{slink||Parameters}} for important details.
 
 
 
By default, the date or range is prefixed with the abbreviation "fl.", wikilinked to its expanded form (''[[floruit]]''); displayable values are separated by a [[whitespace character]]s of varying lengths. Formatted date ranges are separated by a [[spaced en dash]]. [[Line wrap and word wrap]] is off. Optionally, the floruit date may be set to be sortable.{{efn|name=dts|Template {{tl|dts}} ({{bxtn|d}}ate {{bxtn|t}}ime {{bxtn|s}}orting) has been embedded in code and becomes active when the sortable option is used.}} In most cases, usage errors will result in display of relevant error messages.
 
 
 
===Applicability===
 
This template may be used when exact or complete date information
 
{{Ordered list|list_style_type=lower-alpha|is not required|is not necessary or pertinent|is not reliably known}}
 
[[Floruit|By definition]], the relevant date(s) may be month, year, decade, or century ranges, or may otherwise be inexact or approximate. See [[WP:APPROXDATE]] for additional guidance.
 
 
 
===Exceptions===
 
Normally, this template should not be used when exact, complete dates need to be indicated, such as a person's birth and death dates, or an organization's founding and dissolution dates. However, it may be used in similar cases if exact or reliable date information is unavailable, or if providing such detail is unnecessary.
 
 
 
==Parameters==
 
All parameters are optional. Use of parameters {{bxt|date}} (and, for date ranges) {{bxt|date2}} is suggested; either or both may be required by some options. Incorrect values will be flagged under almost all usage scenarios (see {{slink||Error messages}}). Parameter names are in {{bxtn|bold}}; explanatory or expanded text may follow, in parentheses.
 
 
 
===Date formatting parameters===
 
Suggested:
 
*{{bxtn|date}} or {{bxtn|[1]}} (date, or start-date for range){{spaced en dash}} the time period (or the start-date of a time period) during which the subject is known to have been active or popular. Values may be single dates in any relevant time unit. You may use this as a free-form field for single dates or for date ranges; such ranges must be separated by a [[spaced en dash]], where applicable ([[WP:APPROXDATE]]). Single-value ranges such as "1990s" or "21st century" should use this parameter only; ranges with starting and ending dates may also use parameter {{bxt|date2}} [[#rng|below]]. Apply any of Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]], but please follow the relevant format established in the article, if any. Preceded by a [[narrow no-break space]]. Depending on the template options used, {{em|this parameter may require a value}}.
 
:{{em|id=unnamed|Note:}} You may treat {{bxt|date}} as an unnamed parameter, and insert only its desired value.
 
:{{em|id=space|Note:}} If {{bxt|date}} is not utilized, the displayed output may vary according to the user’s choice of [[whitespace character]](s) following the prefix "fl.", or according to other user formatting.
 
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}}
 
*{{anchor|rng}}{{bxtn|date2}} or {{bxtn|[2]}} (end-date for range){{spaced en dash}} this parameter is recommended when depicting floruit ranges; it displays the end-date for the range. {{em|Requires}} a value for parameter {{bxt|date}}. A [[spaced en dash]] is used as the range separator. Depending on the template options used, {{em|this parameter may require a value}}.
 
:{{em|id=unnamed2|Note:}} You may treat {{bxt|date2}} as an unnamed parameter, and insert only its desired value.
 
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}}
 
Optional:
 
*{{bxtn|ca}} (circa){{spaced en dash}} use for [[circa]] dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) (&#8201;c.). Some options {{em|require}} a value for parameter {{bxt|date2}}. Accepts the following values:
 
**set {{para|ca|yes}} or {{para|ca|date}}
 
**set {{para|ca|date2}}
 
**set {{para|ca|both}}
 
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#circa|{{em|here}}]]
 
Conditional ({{em|requires a value for parameter}} {{bxt|date}}):
 
*{{bxtn|sortable}}{{spaced en dash}} set {{para|sortable|yes}} to format the {{bxt|date}} value so that it is displayed properly within [[WP:TABLESORT|sortable table]]s; it works {{em|only}} with single-date values that conform to Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]].{{efn|name=dts}}
 
:{{em|id=sorted|Note:}} When using {{bxt|sortable}}, year values less than 1000 require leading zeroes up to the century digit, e.g. "050". Era suffixes (via parameter {{bxt|sfx}} [[#suf|below]]) are ignored.
 
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#sort|{{em|here}}]]
 
 
 
===Prefix formatting parameters===
 
Optional:
 
*{{bxtn|pfx1}} (prefix style){{spaced en dash}} use this parameter to {{em|italicize}} the display of the prefix "fl.", by setting {{para|pfx1|italics}}.
 
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#sort|{{em|here}}]]
 
*{{bxtn|pfx2}} (prefix link){{spaced en dash}} alias {{bxtn|lk}}. By default, the prefix is wikilinked to ''[[floruit]]''; use this parameter to change the default by inserting one of the following values:
 
**set {{para|pfx2|abbr}} to display a [[tooltip]] when the pointer hovers over "fl.", expanding it to "floruit"; tooltip display may depend on browser and/or operating system version.
 
**set {{para|pfx2|no}} or {{para|pfx2|off}} to display "fl." in plain text; use to avoid [[WP:Overlinking|overlinking]] when this template is used repeatedly in the body of an article ({{slink|Wikipedia:Manual of Style/Abbreviations|Miscellaneous shortenings}}).
 
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#ttip|{{em|here}}]] {{em|(tooltip) and}} [[#plain|{{em|here}}]] {{em|(plain text)}}
 
 
 
===Other parameters===
 
Conditional ({{em|require a value for parameter}} {{bxt|date}}; {{em|may require a value for parameter}} {{bxt|date2}}):
 
*{{bxtn|b}} (brackets){{spaced en dash}} use {{bxt|b}} to display the template's output in parentheses, by setting {{para|b|yes}}.
 
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#brc|{{em|here}}]]
 
*{{anchor|tu}}{{bxtn|unit}} (time unit): use this parameter to specify the floruit date's or range's time unit. Some options also {{em|require}} a value for parameter {{bxt|date2}}. 
 
**set {{para|unit|c}}
 
**set {{para|unit|m}}
 
**set {{para|unit|c-c}}
 
**set {{para|unit|m-m}}
 
*{{anchor|suf}}{{bxtn|sfx}} (suffix): use this parameter to append the floruit date or range with an era suffix preceded by a [[no-break space]]. Displays in plain text, but you may use the dependent parameter {{bxt|sfx-lk}} (see [[#suflink|below]]) to display with an appropriate wikilink. The available options conform to the [[MOS:ERA|default calendar era]]. Some options also {{em|require}} a value for parameter {{bxt|date2}}.
 
**set {{para|sfx|ad}} to display the suffix AD ([[Anno Domini]])
 
**set {{para|sfx|bc}} to display the suffix BC ([[Anno Domini|Before Christ]])
 
**set {{para|sfx|bce}} to display the suffix BCE ([[Common Era|Before Common Era]])
 
**set {{para|sfx|ce}} to display the suffix CE ([[Common Era]])
 
**set {{para|sfx|b-a}}
 
**set {{para|sfx|b-c}}
 
:{{em|id=rng-note|Note:}}
 
:{{en dash}}{{nbsp}}{{em|for an example see}}
 
*{{anchor|suflink}}{{bxtn|sfx-lk}} (suffix link): use to wikilink the suffix to the appropriate page, by setting {{para|sfx-lk|yes}};{{efn|name=noerr|Any other value is ignored silently.}} parameter {{bxt|sfx}} is {{em|required}}.
 
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#suf-lk|{{em|here}}]]
 
Optional:
 
*{{bxtn|wrap}} (word wrap){{spaced en dash}} by default, template output displays without word wrapping; to turn word wrap on, set {{para|wrap|yes}}.
 
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#sort|{{em|here}}]]
 
 
 
==Examples==
 
*{{anchor|dec}}{{strong|Decade range}}
 
:<code><nowiki>{{floruit|date=2010s}}</nowiki></code>
 
:or
 
:<code><nowiki>{{floruit|2010s}}</nowiki></code> ([[#unnamed|{{em|note}}]])
 
:Either generates: {{floruit|2010s}}
 
*{{anchor|brc}}{{strong|Decade range, in parentheses}}
 
:<code><nowiki>{{floruit|date=2010s|b=yes}}</nowiki></code>
 
:or
 
:<code><nowiki>{{floruit|2010s|b=yes}}</nowiki></code>
 
:Either generates: {{floruit|2010s|b=yes}}
 
*{{anchor|plain}}{{strong|Prefix only, in plain text}}
 
:<code><nowiki>{{floruit|pfx2=no}} 2010s</nowiki></code> ([[#space|{{em|note}}]])
 
:Generates: {{floruit|pfx2=no}} 2010s
 
*{{anchor|ttip}}{{strong|Years range, prefix with tooltip}}
 
:<code><nowiki>{{floruit|date=2010{{snd}}2016}}|pfx2=abbr}}</nowiki></code>
 
:Generates: {{floruit|date=2010{{snd}}2016|pfx2=abbr}}
 
*{{anchor|circa}}{{strong|Circa century and suffix}}
 
:<code><nowiki>{{floruit|date=21st century|ca=yes|sfx=ce}}</nowiki></code>
 
:Generates: {{floruit|date=21st century|ca=yes|sfx=ce}}
 
*{{anchor|suf-lk}}{{strong|Suffix wikilinked, prefix in plain text, circa century, in parentheses}}
 
:<code><nowiki>{{floruit|date=21st century|b=yes|ca=yes|pfx2=no|sfx=ce|sfx-lk=yes}}</nowiki></code>
 
:Generates: {{floruit|date=21st century|b=yes|pfx2=no|ca=yes|sfx=ce|sfx-lk=yes}}
 
*{{anchor|sort}}{{strong|Sortable year, word wrap is on, prefix italicized, and suffix}}
 
:<code><nowiki>{{floruit|date=050|sortable=yes|pfx1=italics|sfx=bce|wrap=yes}}</nowiki></code> ([[#sorted|{{em|note}}]])
 
:Generates: {{floruit|date=050|sortable=yes|pfx1=italics|sfx=bce|wrap=yes}}
 
 
 
==Error messages==
 
Multiple errors are flagged per parameter; errors involving the same parameter may be mutually exclusive.</br>
 
Messages replace the relevant parameter value(s), and appear under the following conditions:{{efn|name=tl2|When error messages appear in live usage, the included [[template:tl2|template link]] to {{bxtn|{{tlf|floruit}}}} is active.}}
 
{{crlf|2}}
 
{{strong|Parameters {{bxt|b}}, {{bxt|ca}}, {{bxt|pfx1}}, {{bxt|pfx2}}, {{bxt|sortable}}}} and {{bxt|wrap}}
 
*Incorrect value: {{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong value for the {{var|relevant-parameter}} option&#93;}}}}
 
{{strong|Parameters {{bxt|b}}, {{bxt|sfx}}}} and {{bxt|sortable}}
 
*Date required: {{error|message={{small|&#91;error in template {{tl2|floruit}}: {{var|relevant-parameter}} option requires a date value&#93;}}}}
 
{{strong|Parameter {{bxt|sfx}}}}
 
*Incorrect or unsupported entry: {{error|message={{small|&#91;error in template {{tl2|floruit}}: wrong or unsupported suffix&#93;}}}}
 
{{strong|Parameter {{bxt|sfx-lk}}}}
 
*Suffix not defined: {{error|message={{small|&#91;error in template {{tl2|floruit}}: suffix link requires suffix&#93;}}}}
 
 
 
==Redirects==
 
<!--This section is linked from within this document ([[MOS:HEAD]])-->
 
{{tlf|floruit}} has the following [[Wikipedia:redirect|redirect]]s:
 
*{{tl|fl.}}
 
*{{tl|flor}}
 
*{{tl|flor.}}
 
*{{tl|flourished}}
 
*{{tl|flr}}
 
 
 
==TemplateData==
 
{{TemplateDataHeader|floruit}}
 
<templatedata>
 
{
 
"params": {
 
"ca": {
 
"label": "Circa",
 
"description": "Set to \"yes\" for circa date(s)",
 
"type": "boolean",
 
"default": "no circa"
 
},
 
"date": {
 
"aliases": [
 
"1"
 
],
 
"label": "Date",
 
"description": "Time-period or era, may be a single date or a range",
 
"type": "string",
 
"suggested": true
 
},
 
"sortable": {
 
"label": "Sortable",
 
"description": "Set to \"yes\" to sort the date correctly within tables; works with single dates only; requires a 'date' value",
 
"type": "boolean",
 
"default": "no sorting"
 
},
 
"b": {
 
"label": "Brackets",
 
"description": "Set to \"yes\" to display output in parentheses; requires a 'date' value",
 
"type": "boolean",
 
"default": "no parentheses"
 
},
 
"wrap": {
 
"label": "Word wrap",
 
"description": "Set to \"yes\" to turn word wrap on",
 
"type": "boolean",
 
"default": "no wrap"
 
},
 
"pfx1": {
 
"label": "Prefix style",
 
"description": "Set to \"italics\" to render the prefix fl. in italics",
 
"type": "string"
 
},
 
"pfx2": {
 
"aliases": [
 
"lk"
 
],
 
"label": "Prefix link",
 
"description": "Use to change the default display of the prefix fl.: \"abbr\" replaces wikilink to 'floruit' with a tooltip; \"no\" or \"off\" renders fl. in plain text",
 
"type": "string",
 
"default": "[[Floruit|fl.]]"
 
},
 
"sfx": {
 
"label": "Suffix",
 
"description": "Adds an era suffix; options are: \"ad\", \"bc\", \"bce\", or \"ce\"; displays in uppercase; requires a 'date' value",
 
"type": "string"
 
},
 
"sfx-lk": {
 
"label": "Suffix link",
 
"description": "Set to \"yes\" to wikilink the era suffix; requires a suffix",
 
"type": "boolean",
 
"default": "no link"
 
}
 
},
 
"description": "Formats the display of periods of activity or popularity for people, ideas, or movements",
 
"paramOrder": [
 
"date",
 
"b",
 
"ca",
 
"pfx1",
 
"pfx2",
 
"sfx",
 
"sfx-lk",
 
"sortable",
 
"wrap"
 
],
 
"format": "inline"
 
}
 
</templatedata>
 
 
 
==See also==
 
*[[Tempore]]
 
*{{tl|b.}}
 
*{{tl|circa}}
 
*{{tl|reign}}
 
 
 
==Footnotes==
 
{{notelist}}
 
 
 
}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 13:06, 26 July 2018

fl.

Template documentation[view] [edit] [history] [purge]

Usage

Source: {{fl.}} 1234, {{fl.|1234}} or {{fl.|1234|lk=off}}

Result: fl. 1234, fl. 1234 or fl. 1234

This template generates an abbreviation for floruit ("fl."); by default, it has a mouse-over tooltip explaining its meaning.

Parameters

This template supports an optional (first, unnamed) parameter representing a year. For example, {{fl.|1956}} renders to give fl. 1956. This differs from {{fl.}} 1956 in that {{fl.|1956}} puts a non-breaking space in between the "fl." and the number, which prevents the web browsers from inserting a line break there.

If the parameter "sortable=yes" is specified, the template generates invisible text that will cause the output to work in sortable tables, at the cost of causing problems for visually-impaired readers. Compare "Col 1" and "Col 2" in the following table:

Title Col 1 Col 2
Foo 1066 1066
Bar fl. 1510 1510fl. 1510
Baz 1956 1956
Jaz fl. 410 410fl. 410

"Col 1" uses {{Floruit}} 1510, and does not sort correctly. "Col 2" uses {{Floruit|1510|sortable=yes}}, and does sort correctly. This works because {{Floruit|1510|sortable=yes}} inserts an invisible span element at the start of the cell: <span style="display:none;">1510</span>. Although it is not rendered, it is still seen by the sorting code and makes sorting work.

The downside of this approach is that the invisible text is still rendered by screen readers that are used by visually impaired readers, and by text browsers such as Lynx, so the table will become garbled for readers who are using assistive technology or text browsers.

If the |lk= (as in "link") parameter is set to |lk=off, then the abbreviation will be rendered as fl. (without a wikilink). Otherwise, the link is displayed. (This can be used to avoid overlinking when this template is used repeatedly in the body of an article.)

Potential future parameters could add articles to appropriate categories, e.g. Category:Year of birth missing.

See also