Difference between revisions of "Template:Geological epoch"

From blackwiki
Jump to navigation Jump to search
imported>Benniboi01
(This allows you to customize the template's color, the title text at the top, etc. (in case the title of an article is not exactly like the period you're trying to call).)
imported>Benniboi01
m (edited the template so that the first character in the title near the top of the template is always capitalized, even when you enter a custom name in.)
Line 1: Line 1:
 
<includeonly>{| class="wikitable" style="float:right; margin-left:1em; width: {{{width|20}}}em; text-align: center;"
 
<includeonly>{| class="wikitable" style="float:right; margin-left:1em; width: {{{width|20}}}em; text-align: center;"
 
|-
 
|-
| colspan="2" style="background-color: {{period color|{{{period|{{#if:{{{color|}}} | {{{color}}} | {{PAGENAME}} }} }}} }}" |'''{{{period| {{#if:{{{title|}}} | {{{title}}} | {{PAGENAME}}}}}}} Epoch'''<br />
+
| colspan="2" style="background-color: {{period color|{{{period|{{#if:{{{color|}}} | {{{color}}} | {{PAGENAME}} }} }}} }}" |'''{{{period| {{#if:{{{title|}}} | {{ucfirst:{{{title}}}}} | {{PAGENAME}}}}}}} Epoch'''<br />
 
''{{#if:{{{start|}}} | {{{start}}} | {{period start|{{{period|{{PAGENAME}}}}}}}}}–{{#if:{{{stop|}}} | {{{stop}}} | {{Period end|{{{period|{{PAGENAME}}}}}}}}}&nbsp;million years ago''<br />{{Time scale}}
 
''{{#if:{{{start|}}} | {{{start}}} | {{period start|{{{period|{{PAGENAME}}}}}}}}}–{{#if:{{{stop|}}} | {{{stop}}} | {{Period end|{{{period|{{PAGENAME}}}}}}}}}&nbsp;million years ago''<br />{{Time scale}}
 
<!-- Including this template in the documentation results in two "Expression error: Unexpected round operator" messages in the above line.  -->
 
<!-- Including this template in the documentation results in two "Expression error: Unexpected round operator" messages in the above line.  -->

Revision as of 23:20, 17 March 2020

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

This template is used on each of the geological epochs' wiki pages.

Usage

By default, this template uses the {{PAGENAME}} magic word to detect which period to display. Period can be overridden using parameter |period=.

Different periods use different titles, colors, a start and stop dates, and a special timeline displays. By default, these values are derived from the chosen period, and they can be changed using parameters |color=, |title=, |start=, |stop=, and |timeline=, respectively.

Parameters

|period=
Which geological period to display.
|title=
Customize title.
|color=
Customize color. For available values see documentation of template {{period color}}.
|timeline=Foobar
Choose which of the graphical timeline templates to display. Only templates named Template:Foobar graphical timeline are supported. For example, use |timeline=Late Devonian to display Template:Late Devonian graphical timeline. To disable the timeline set |timeline=off.
|start= and |stop=
Start and end dates. The unit is a million years. By default, templates {{period start}} and {{period end}} are used to show the start and end of the period.

Examples

Markup Renders as
{{Geological epoch|timeline=off|title=Example title|period=late devonian}}
colspan="2" style="background-color: Template:Period color" |late devonian Epoch

Template:Period startTemplate:Period end million years ago
Template:Time scale

{{Geological epoch|timeline=off|title=Example title|color=late devonian|start=382.7|stop=358.9}}
colspan="2" style="background-color: Template:Period color" | Example title Epoch

382.7–358.9 million years ago
Template:Time scale

{{Geological epoch
|period=mississippian
|timeline=Mississippian (geology)
}}
colspan="2" style="background-color: Template:Period color" |mississippian Epoch

Template:Period startTemplate:Period end million years ago
Template:Time scale

Template:Mississippian (geology) graphical timeline

See also

Template:Period infoboxes