Bản mẫu:Năm theo thể loại

Trang bản mẫu bị khóa vô hạn
Bách khoa toàn thư mở Wikipedia
(Đổi hướng từ Bản mẫu:Year by category)
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Mục đích

This template is intended to be used in year-based categories where the year is the first thing in the category name (for example, 2008 in Canadian music or 1979 disasters). It creates a "timeline" style table of links to categories for adjacent years before or after it in the same decade (see example below).

Cú pháp

{{Năm theo thể loại
| m = 
| c = 
| d = 
| y = 
| cat = 
| in = 
| parent = 
| subcat = 
| sortkey = 
}}

Các tham số

The first 5 parameters split the name of the category page receiving the template into separate pieces. They are used to form the timeline links.

  • m = ký số thế đại
  • c = ký số thế kỷ
  • d = ký số thập niên
  • y = ký số năm
    The single-digit values of these 4 parameters, taken together ("mcdy"), form the four-digit year. If the year is before 1000 (and thus only 3 digits long) or even earlier, parameters can be omitted, as necessary.
  • cat = category name suffix
    The portion of the category name after the year, including the word "in" if present.


The next parameter can be used to link to a "main article" for the category.

  • in = see also article name suffix
    Optional: Adds a "see also" link to a closely related "year-in" article. This suffix should not contain the year or the word "in", which is provided by the template itself.


The rest of the parameters are used to categorize the page containing the template.

  • parent = parent category name
    Optional: Full name (not including "Category:" prefix) of the category into which this category and similar categories for other years will all be placed (typically, but not always, named something like "topic by year"). Note that a sortkey is not used, so the sorting will be by year.
  • subcat = different category name
    Optional: The full name (not including the "Category:" prefix) of another appropriate parent category, typically for the same year. If omitted, the current category will be placed in the category for the year itself, using the value of the "cat" parameter as the sortkey (note that this will not be acceptable if the value of "cat" begins with the word "in").
  • sortkey = category sortkey text
    The sortkey used on the category link created by the previous parameter. If "subcat" is used but "sortkey" is not specified, a blank sortkey will be used.

Note that both the "parent" and "subcat" parameters are referring to parent categories of the category page the template is being placed on.

Các ví dụ

Sử dụng tất cả các tham số

Khi được đặt trên trang Thể loại:Âm nhạc Canada năm 2008:

{{Năm theo thể loại
| m = 2
| c = 0
| d = 0
| y = 8
| cat = Âm nhạc Canada năm
| in = Âm nhạc Canada
| parent = Âm nhạc Canada theo năm
| subcat = Canada năm 2008
| sortkey = Âm nhạc
}}
  • hiển thị sau "dòng thời gian" và "xem thêm" liên kết bài viết:
  • 2003
  • 2004
  • 2005
  • 2006
  • 2007
  • 2008
  • 2009
  • 2010
  • 2011
  • 2012
  • 2013

Sử dụng một số tham số

Khi được đặt trên trang Thể loại:Thảm họa 1912:

{{Năm theo thể loại
| m = 1
| c = 9
| d = 1
| y = 2
| cat = thảm họa
| parent = Thảm họa thế kỷ 20
}}
  • hiển thị sau "dòng thời gian" (lưu ý năm qua không phải là liên kết, vì nó sẽ là một tham khảo đến cùng thể loại bản mẫu là trên):
  • 1907
  • 1908
  • 1909
  • 1910
  • 1911
  • 1912
  • 1913
  • 1914
  • 1915
  • 1916
  • 1917

Bản mẫu con