வார்ப்புரு:Year by category/doc
{{documentation subpage}}
 __NOTOC__
 ===Purpose===
 This template is intended to be used in year-based categories '''where the year is the first thing in the category name''' (for example, [[:Category:2008 in Canadian music|2008 in Canadian music]] or [[:Category:1979 disasters|1979 disasters]]).  It creates a &quot;timeline&quot; style table of links to categories for adjacent years before or after it in the same decade (see example below).
 
 === Syntax ===
 &lt;pre&gt;
 {{Year by category
 | m = 
 | c = 
 | d = 
 | y = 
 | cat = 
 | in = 
 | parent = 
 | subcat = 
 | sortkey = 
 }}
 &lt;/pre&gt;
 
 === Parameters ===
 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 =''' &lt;var&gt;millennium digit&lt;/var&gt;
 * '''c =''' &lt;var&gt;century digit&lt;/var&gt;
 * '''d =''' &lt;var&gt;decade digit&lt;/var&gt;
 * '''y =''' &lt;var&gt;year digit&lt;/var&gt;
 *: The single-digit values of these 4 parameters, taken together (&quot;'''mcdy'''&quot;), 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 =''' &lt;var&gt;category name suffix&lt;/var&gt;
 *: The portion of the category name after the year, including the word &quot;in&quot; if present.
 &lt;br /&gt;
 The next parameter can be used to link to a &quot;main article&quot; for the category.
 * '''in =''' &lt;var&gt;see also article name suffix&lt;/var&gt;
 *: ''Optional:''  Adds a &quot;see also&quot; link to a closely related &quot;year-in&quot; article. This suffix should ''not'' contain the year or the word &quot;in&quot;, which is provided by the template itself.
 &lt;br /&gt;
 The rest of the parameters are used to categorize the page containing the template.
 * '''parent =''' &lt;var&gt;parent category name&lt;/var&gt;
 *: ''Optional:'' Full name (not including &quot;Category:&quot; 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 &quot;&lt;var&gt;topic&lt;/var&gt; by year&quot;). Note that a [[WP:SORT|sortkey]] is ''not used'', so the sorting will be by year.
 * '''subcat =''' &lt;var&gt;different category name&lt;/var&gt;
 *: ''Optional:'' The full name (not including the &quot;Category:&quot; 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 &quot;cat&quot; parameter as the [[WP:SORT|sortkey]] (note that this will not be acceptable if the value of &quot;cat&quot; begins with the word &quot;in&quot;).
 * '''sortkey =''' &lt;var&gt;category sortkey text&lt;/var&gt;
 *: The [[WP:SORT|sortkey]] used on the category link created by the previous parameter. If &quot;subcat&quot; is used but &quot;sortkey&quot; is not specified, a blank sortkey will be used.
 Note that both the &quot;parent&quot; and &quot;subcat&quot; parameters are referring to ''parent categories'' of the category page the template is being placed on.
 
 === Example using all parameters ===
 When placed on the page [[:Category:2008 in Canadian music]]:
 &lt;pre&gt;
 {{cat year nav
 | m = 2
 | c = 0
 | d = 0
 | y = 8
 | cat = in Canadian music
 | in = Canadian music
 | parent = Years in Canadian music
 | subcat = 2008 in Canada
 | sortkey = Music
 }}&lt;/pre&gt;
 * displays the following &quot;timeline&quot; and &quot;see also&quot; article link:
 &lt;blockquote&gt;&lt;!-- note: &quot;live&quot; template call not used to prevent this documentation page from appearing in Category:2008 --&gt;
 {| id=&quot;toc&quot; class=&quot;toccolours&quot;  border=&quot;1&quot; cellpadding=4 style=&quot;border-collapse: collapse; margin: 1em; border-style:solid;border-width:1px;&quot;
 | style=&quot;text-align: center;&quot;| [[:Category:1999 in Canadian music|←]] [[:Category:2000 in Canadian music|2000]]{{·}}  [[:Category:2001 in Canadian music|2001]]{{·}} [[:Category:2002 in Canadian music|2002]]{{·}} [[:Category:2003 in Canadian music|2003]]{{·}} [[:Category:2004 in Canadian music|2004]]{{·}} [[:Category:2005 in Canadian music|2005]]{{·}} [[:Category:2006 in Canadian music|2006]]{{·}} [[:Category:2007 in Canadian music|2007]]{{·}} [[:Category:2008 in Canadian music|2008]]{{·}} [[:Category:2009 in Canadian music|2009]] [[:Category:2010 in Canadian music|→]]
 |}
 {{see also|2008 in Canadian music}}
 &lt;/blockquote&gt;
 * places the page into [[:Category:Years in Canadian music]] (sorted by year) and [[:Category:2008 in Canada]] (using the sortkey &quot;Music&quot;, which is appropriate since everything in the latter category already pertains to 2008 and Canada)
 
 === உதாரணம் ===
 [[:பகுப்பு:1999 நிகழ்வுகள்]] பக்கத்தில் இவ்வாறு இட்டால்: 
 &lt;pre&gt;{{Year by category
 | m = 1
 | c = 9
 | d = 9
 | y = 9
 | cat = நிகழ்வுகள்
 | parent = 
 }}
 &lt;/pre&gt;
 * displays the following &quot;timeline&quot; (note that the last year isn't linked, since it would be a reference to the same category the template is on):
 &lt;blockquote&gt;&lt;!-- note: &quot;live&quot; template call not used to prevent this documentation page from appearing in Category:1979 --&gt;
 {| id=&quot;toc&quot; class=&quot;toccolours&quot;  border=&quot;1&quot; cellpadding=4 style=&quot;border-collapse: collapse; margin: 1em; border-style:solid;border-width:1px;&quot;
 | style=&quot;text-align: center;&quot;| [[:பகுப்பு:1989 நிகழ்வுகள்|←]] [[:பகுப்பு:1990 நிகழ்வுகள்|1990]]{{·}} [[:பகுப்பு:1991 நிகழ்வுகள்|1991]]{{·}} [[:பகுப்பு:1992 நிகழ்வுகள்|1992]]{{·}} [[:பகுப்பு:1993 நிகழ்வுகள்|1993]]{{·}} [[:பகுப்பு:1994 நிகழ்வுகள்|1994]]{{·}} [[:பகுப்பு:1995 நிகழ்வுகள்|1995]]{{·}} [[:பகுப்பு:1996 நிகழ்வுகள்|1996]]{{·}} [[:பகுப்பு:1997 நிகழ்வுகள்|1997]]{{·}} [[:பகுப்பு:1998 நிகழ்வுகள்|1998]]{{·}} [[:பகுப்பு:1999 நிகழ்வுகள்|1999]] [[:பகுப்பு:2000 நிகழ்வுகள்|→]]
 |}
 &lt;/blockquote&gt;
 * places the page into [[:Category:20th-century disasters]] (sorted by year) and (since &quot;subcat&quot; wasn't specified) [[:[[:பகுப்பு:1999]] (using the sortkey &quot;நிகழ்வுகள்&quot;)
 
 &lt;includeonly&gt;
 [[பகுப்பு:வார்ப்புருக்கள்]]
 
 [[ar:قالب:السنة حسب التصنيف]]
 [[bn:টেমপ্লেট:Year by category]]
 [[en:Template:Year by category]]
 [[es:Plantilla:Países por año]]
 [[ja:Template:Year by category]]
 [[tr:Şablon:Yıla göre kategori]]
 [[uk:Шаблон:Рік за категорією]]
 [[ur:سانچہ:سال بلحاظ زمرہ]]
 [[zh:Template:依分類劃分的年份]]