• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:Timeline

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Timeline
CSSThis template uses TemplateStyles:
  • Module:Timeline/styles.css
For the <timeline> tag, see Help:EasyTimeline syntax.

This template is used to create navbox in the form of a timeline.

Contents

  • 1 Usage
  • 2 Parameters
    • 2.1 Content parameters
    • 2.2 Navbox parameters
    • 2.3 Time parameters
    • 2.4 Content style parameters
    • 2.5 Navbox style parameters
    • 2.6 Class parameters
  • 3 Examples
    • 3.1 Basic
    • 3.2 label
    • 3.3 decades
    • 3.4 footer
    • 3.5 Item and label styles
    • 3.6 above and below
    • 3.7 start and end
    • 3.8 Inside another navbox
    • 3.9 image and imageleft

Usage

Please remove the parameters that are left blank.

{{Timeline
| name   = {{subst:PAGENAME}}
| title  = 
| state  = {{{state|}}}
| image  = 
| above  = 
| row1   = 
| item1  = 
| date1  = 
| style1 = 
| item2  = 
| date2  = 
| style2 = 
<!-- ... -->
| below  = 
}}

Parameters

For more detailed explanation, see Template:Navbox § Parameter descriptions.

Content parameters

These parameters are used to change the content of the timeline portion of the navbox.

  • rown - Defines a row with a optional label.
  • spann - Sets how many rows tall the label for row n should be. Any labels for rows that fall inside the label will be discarded.
  • itemn - Defines an item to show in the navbox. The item is shown in the last defined row. If an item exists without a row of the same number, it is either added to the previous row or a new row is created.
  • daten - Defines the start and end year for item n in the format start-end. If end is omitted, the current year is omitted, so generally the items at the end of the timeline should use the format start-.
  • decades - Set to no to remove the decade row and to show the full year.
  • footer - Set to yes to show the date rows at the bottom of the timeline as well.
  • label - Include to show a label column with the content of the rown parameters beneath the value of the label parameter.

Navbox parameters

These parameters are that are used to change the navbox.

  • name - The name of the template.
  • title - Text to add to the title bar, for example Honda road car timeline.
  • above - Text to add above the "content" of the navbox.
  • below - Text to add below the "content" of the navbox.
  • state - Weather the navbar is expanded, collapsed, or not collapsible.
  • navbar - Set to plain or off to remove the V • T • E links on the left side of the title of the navbar, it is recommended you don't do this to maintain consistency between navboxes.
  • border or 1 - Set to child or subgroup to use this navbox as a borderless navbox that can fit snugly in another navbox. Set to none to remove the border and the navbox class.
  • image - An image to be displayed in a cell below the title and to the right of the body.
  • imageleft - An image to be displayed in a cell below the title and to the left of the body.

Time parameters

These parameters adjust the length of the timeline

  • startoffset - Set to a number to extend the start of the timeline that number of years back
  • startyear - Set to a year to set the start of the timeline to that year if the content of the navbox doesn't go beyond that year
  • endoffset - Set to a number to extend the end of the timeline that number of years forward
  • endyear - Set to a year to set the end of the timeline to that year if the content of the navbox doesn't go beyond that year

Content style parameters

These parameters apply style to the "content" of the navbox.

  • stylen - CSS to apply to the cell of item n.
  • labelstylen - CSS to apply to the label of row n.
  • itemstyle - CSS to apply to item cells.
  • blankstyle - CSS to apply to blank cells.
  • labelstyle - CSS to apply to label cells.
  • datestyle - CSS to apply to year and decade cells.
  • decadestyle - CSS to apply to decade cells.
  • yearstyle - CSS to apply to year cells.

Navbox style parameters

These parameters apply style to the parts of the navbox outside of the "content" of the navbox.

  • style or bodystyle - CSS to apply to the body of the navbox.
  • basestyle - CSS to apply to the title, above, and below.
  • titlestyle - CSS to apply to the title.
  • abovestyle - CSS to apply to the above.
  • belowstyle - CSS to apply to the below.
  • imagestyle - CSS to apply to the cell containing image
  • imageleftstyle - CSS to apply to the cell containing imageleft

Class parameters

These parameters add classes to parts of the navbox.

  • titleclass - Classes to add to the title of the navbox.
  • aboveclass - Classes to add to the above of the navbox.
  • bodyclass - Classes to add to the body of the navbox.
  • belowclass - Classes to add to the below of the navbox.
  • imageclass - Classes to add to both the right and left images of the navbox.

Examples

Basic

This is a basic example of this template.

Source code
{{Timeline
| name   = {{FULLPAGENAME}}
| state  = uncollapsed
| title  = Example timeline
| row1   =
| item1  = Foo
| date1  = 1985-2014
| item2  = Bar
| date2  = 2019-2035
| row3   =
| item3  = Baz
| date3 = 1995-2020
}}
  • v
  • t
  • e
Example timeline
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
FooBar
Baz

label

When you specify the |label= parameter, the contents of the |rown= parameters are shown on the left underneath the |label= parameter.

Source code
{{Timeline
| name   = {{FULLPAGENAME}}
| state  = uncollapsed
| title  = Example timeline
| label  = Type
| row1   = A
| item1  = Foo
| date1  = 1985-2014
| item2  = Bar
| date2  = 2019-2035
| row3   = B
| span3  = 2
| item3  = Baz
| date3  = 1995-2020
| row4   =
| item4  = Qux
| date4  = 2005-2015
}}
  • v
  • t
  • e
Example timeline
Type1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
AFooBar
BBaz
Qux

decades

When |decades=no is set, the decade row is removed and the year row contains the full years.

Source code
{{Timeline
| name    = {{FULLPAGENAME}}
| state   = uncollapsed
| title   = Example timeline
| label   = Type
| decades = no
| row1    = A
| item1   = Foo
| date1   = 1985-2014
| item2   = Bar
| date2   = 2019-2035
| row3    = B
| item3   = Baz
| date3   = 1995-2020
}}
  • v
  • t
  • e
Example timeline
Type19851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034
AFooBar
BBaz

footer

When |footer=yes is set, the decade and year rows at the top of the template are shown again at the bottom. This is useful for very large timelines.

Source code
{{Timeline
| name   = {{FULLPAGENAME}}
| state  = uncollapsed
| title  = Example timeline
| footer = yes
| row1   =
| item1  = Foo
| date1  = 1985-2014
| item2  = Bar
| date2  = 2019-2035
| row3   =
| item3  = Baz
| date3  = 1995-2020
}}
  • v
  • t
  • e
Example timeline
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
FooBar
Baz
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234

Item and label styles

The |stylen= parameters can be used to style items and the |labelstylen= can be used to style rows.

Source code
{{Timeline
| name        = {{FULLPAGENAME}}
| state       = uncollapsed
| title       = Example timeline
| label       = Type
| row1        = A
| labelstyle1 = background: #e459e4;
| item1       = Foo
| date1       = 1985-2014
| style1      = background-color: #ff7c7c;
| item2       = Bar
| date2       = 2019-2035
| style2      = background-color: #e6cd38;
| row3        = B
| labelstyle3 = background: #50aeff;
| item3       = Baz
| date3       = 1995-2020
| style3      = background-color: #72d272;
}}
  • v
  • t
  • e
Example timeline
Type1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
AFooBar
BBaz

above and below

Source code
{{Timeline
| name   = {{FULLPAGENAME}}
| state  = uncollapsed
| title  = Example timeline
| above  = Above
| below  = Below
| row1   =
| item1  = Foo
| date1  = 1985-2014
| item2  = Bar
| date2  = 2019-2035
| row3   =
| item3  = Baz
| date3  = 1995-2020
}}
  • v
  • t
  • e
Example timeline
Above
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
FooBar
Baz
Below

start and end

|startoffset= and |endoffset= can be used to extend the start and end of the timeline.

Source code
{{Timeline
| name        = {{FULLPAGENAME}}
| state       = uncollapsed
| title       = Example timeline
| startoffset = 5
| endoffset   = 5
| row1        =
| item1       = Foo
| date1       = 1985-2014
| item2       = Bar
| date2       = 2019-2035
| row3        =
| item3       = Baz
| date3       = 1995-2020
}}
  • v
  • t
  • e
Example timeline
1980s1990s2000s2010s2020s2030s
012345678901234567890123456789012345678901234567890123456789
FooBar
Baz

Alternatively, |startyear= and |endyear= can be used to extends the start and end of the timeline to those years of the content of the timeline doesn't go beyond those years.

Source code
{{Timeline
| name      = {{FULLPAGENAME}}
| state     = uncollapsed
| title     = Example timeline
| startyear = 1975
| endyear   = 2046
| row1      =
| item1     = Foo
| date1     = 1985-2014
| item2     = Bar
| date2     = 2019-2035
| row3      =
| item3     = Baz
| date3     = 1995-2020
}}
  • v
  • t
  • e
Example timeline
1970s1980s1990s2000s2010s2020s2030s2040s
56789012345678901234567890123456789012345678901234567890123456789012345
FooBar
Baz

Inside another navbox

This template can be used to inside another navbox by calling it using {{Timeline|child|...}}.

Source code
{{Navbox
| title  = Example timeline
| group1 = Timeline
| state  = uncollapse
| list1  = {{Timeline|child
| row1   =
| item1  = Foo
| date1  = 1985-2014
| item2  = Bar
| date2  = 2019-2035
| row3   =
| item3  = Baz
| date3  = 1995-2020
}}
}}
Example timeline
Timeline
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
FooBar
Baz

image and imageleft

The |image= and |imageleft= can be used to add content (preferably images) to the right and left of the navbox respectively.

Source code
{{Timeline
| name      = {{FULLPAGENAME}}
| state     = uncollapsed
| title     = Example timeline
| image     = [[File:Flag of the United States.svg|100px]]
| imageleft = [[File:Flag of Canada.svg|100px]]
| row1      =
| item1     = Foo
| date1     = 1985-2014
| item2     = Bar
| date2     = 2019-2035
| row3      =
| item3     = Baz
| date3     = 1995-2020
}}
  • v
  • t
  • e
Example timeline
Flag of Canada.svg
1980s1990s2000s2010s2020s2030s
56789012345678901234567890123456789012345678901234
FooBar
Baz
Flag of the United States.svg
The above documentation is transcluded from Template:Timeline/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:Timeline&oldid=33485"
Categories:
  • Lua-based templates
  • Templates using TemplateStyles
  • Navigational boxes without horizontal lists
  • Timeline templates
Last edited on 5 April 2021, at 20:26

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 5 April 2021, at 20:26.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop