[go: nahoru, domu]

跳至內容

模板:C20YearTOC

出自維基百科

The Template:C20YearTOC displays an article's Table of Contents (TOC) in a condensed form for particular articles which list events by month-name, with Nobel prizes. The optional parameters allow adding up to 3 other phrases as subheaders in the TOC display, or indexing to bimonthly groups.

Usage: {{C20YearTOC}}
Usage: {{C20YearTOC|bimonthly=yes}}
Usage: {{C20YearTOC|yr|subhead1|bimonthly=yes}}
Usage: {{C20YearTOC|yr|subhead1|subhead2|...}}
Usage: {{C20YearTOC|yr|subhead1|subhead2|subhead3}}
The optional parameter "yr" defaults to PAGENAME, to display the
subheader "Events of 'yr'" while the optional second parameter
"subhead1" allows adding a customized TOC subheader @過世, and
"subhead2" allows a customized TOC subheader at "Nobel prizes" &
"subhead3" allows a customized TOC subheader at "Fictional"
(To skip "subhead1" put 2 vertical bars, as in "| |subhead2").
Parameter "bimonthly=yes" links to the event months as being
bimonthly groups: linking both Jan/Feb to "元月-二月" etc.
If the calling/containing article does not have a subheader for
a particular label-link in the TOC, then clicking that link goes
nowhere, unless such a subheader is in the article's text.
Missing subheaders do NOT generate red-line links.

See also[編寫源代碼]

Examples[編寫源代碼]

Below are the results from passing optional parameters:

For default parameters, this template "{{C20YearTOC}}" produces:

目錄:
  1. C20YearTOC發生嗰事
  2. 出世 - 過世
  3. 節氣
  4. 諾貝爾獎
  5. 參考 -  注釋 -  外部鏈接

For "{{C20YearTOC|1925|bimonthly=yes}}":

目錄:
  1. 1925發生嗰事
  2. 出世 - 過世
  3. 節氣
  4. 諾貝爾獎
  5. 參考 -  注釋 -  外部鏈接

For "{{C20YearTOC|1967|Environmental|XYZ Award}}":

目錄:
  1. 1967發生嗰事
  2. 出世 - 過世  -  Environmental
  3. 節氣
  4. 諾貝爾獎  -  XYZ Award
  5. 參考 -  注釋 -  外部鏈接

For "{{C20YearTOC|1980|Ship events|XYZ Award|World population}}":

目錄:
  1. 1980發生嗰事
  2. 出世 - 過世  -  Ship events
  3. 節氣
  4. 諾貝爾獎  -  XYZ Award
  5. 參考 -  注釋 -  外部鏈接