Changes

Jump to navigation Jump to search
m
Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB
{{Documentation subpage}}
==Purpose==
This template returns navigation links to the existing talk page archives named as subpages by year and month. The three character month abbreviation is returned for each month of the year. If an archive page exists for a specific month the corresponding three character month abbreviation returned is a link to that archive page. This template is typically used multiple times within an {{tl|archive box}} template to build a nicely formatted set of archive links by month over multiple years.

The default is to look for subpages of the root talk page with names of the <kbd>/Archives/YYYY/Monthname</kbd> format (e.g. <kbd>Talk:YourPage/Archives/2012/December</kbd>). There are several possible formats for the archive names depending on the parameters set. The possible formats include:

{| class="wikitable"
|+ Archive subpage name format possibilities
! Archive subpage format !! Parameters
|-
|<nowiki>Talk:YourPage/Archives/YYYY/Month</nowiki>{{!!}}The default
|-
|<nowiki>Talk:YourPage/YourText/YYYY/Month</nowiki>{{!!}}with <code><nowiki>|archprefix = YourText/</nowiki></code>
|-
|<nowiki>Talk:YourPage/YourTextYYYY/Month</nowiki>{{!!}}with <code><nowiki>|archprefix = YourText</nowiki></code>
|-
|<nowiki>Talk:YourPage/Archives/YYYY/Mon</nowiki>{{!!}}with <code><nowiki>|abbrev3 = yes</nowiki></code>
|-
|<nowiki>Talk:YourPage/Archives/YYYY/1</nowiki>{{!!}}with <code><nowiki>|numbers = yes</nowiki></code>
|-
|<nowiki>Talk:YourPage/Archives/YYYY/01</nowiki>{{!!}}with <code><nowiki>|numbers0 = yes</nowiki></code>
|-
|<nowiki>Talk:YourPage/WikipediaText/01</nowiki>{{!!}}with <code><nowiki>|archprefix = Wikipedia |year = Text |numbers0 = yes</nowiki></code>
|}

The template returns links to the pages in <kbd>Talk:YourPage/Archives/YYYY/Month</kbd> even if it is located in a subpage of Talk:YourPage. Explicitly, this means that it can be used for archive navigation within your actual archive pages. It would need to be included in what you have defined as your archive header.

==Intricacies==
If the corresponding /Archives/year/monthname archive page does not exist the corresponding month label will be displayed without a link.

==Syntax==
<pre>{{archives by months|YYYY}}</pre>
or
<pre>{{archives by months|YYYY|Archive Prefix}}</pre>
or
<pre>{{archives by months
| year = YYYY
| archprefix = Archives/
| abbrev3 =
| numbers =
| numbers0 =
}}
</pre>

=== Parameters ===
==== Ordered parameters ====
The first ordered (unnamed) parameter is the year. This is appended to the root talk page name after <kbd>archprefix</kbd>. The second ordered parameter, if it exists, is synonymous to <code>archiveprefix</code> (see below).

==== Named parameters ====
;year :Valid if the first ordered parameter does not exist. It is the text used to append to the base talk page name/{archprefix}/{year}/Month.
;archprefix :The prefix for your archive names. For example, if the page's archives are located in Talk:YourPage/Archive/YYYY/Month then you would use <kbd>archprefix=Archive/</kbd>
;abbrev3:If this parameter is <kbd>abbrev3=yes</kbd>) then instead of looking for pages with names ending in "January", "February", "March" ..., the template will find pages with names ending in "Jan", "Feb", "Mar", etc. If set to "yes", this parameter supersedes both the <kbd>numbers</kbd> and <kbd>numbers0</kbd> parameters.
;numbers:If this parameter is <kbd>numbers=yes</kbd>) then instead of looking for pages with names ending in "January", "February", "March" ..., the template will find pages with names ending in "1", "2", "3", ... "12". If set to "yes", this parameter supersedes the <kbd>numbers0</kbd> parameter.
;numbers0:If this parameter is <kbd>numbers0=yes</kbd>) then instead of looking for pages with names ending in "January", "February", "March" ..., the template will find pages with names ending in "01", "02", "03", ... "12".

==Examples==
<pre>{{archives by months|2013}}</pre>

will display as:
{{archives by months|2013}}

All the other parameters change the page names that are checked for existence and linked if existing. They do not change the display looks.

==Typical usage==
{| border="0"
|-
| colspan="2" | The most common general option is by using the {{tl|Archives by months}} template to generate links to your existing archives. It produces a live link for each existing archive month within a year. It is commonly used in something similar to (delete the lines for the years you don't want):<br />
|-
| width="300" |<pre><nowiki>{{archive box |search=yes |index=/Archive index |collapsible=yes |
bot=ClueBot III |age=90 | </nowiki>
<nowiki>{{nowrap|'''2004''': {{Archives by months|2004}}}}</nowiki>
<nowiki>{{nowrap|'''2005''': {{Archives by months|2005}}}}</nowiki>
<nowiki>{{nowrap|'''2006''': {{Archives by months|2006}}}}</nowiki>
<nowiki>{{nowrap|'''2007''': {{Archives by months|2007}}}}</nowiki>
<nowiki>{{nowrap|'''2008''': {{Archives by months|2008}}}}</nowiki>
<nowiki>{{nowrap|'''2009''': {{Archives by months|2009}}}}</nowiki>
<nowiki>{{nowrap|'''2010''': {{Archives by months|2010}}}}</nowiki>
<nowiki>{{nowrap|'''2011''': {{Archives by months|2011}}}}</nowiki>
<nowiki>{{nowrap|'''2012''': {{Archives by months|2012}}}}</nowiki>
<nowiki>{{nowrap|'''2013''': {{Archives by months|2013}}}}</nowiki>
<nowiki>{{nowrap|'''2014''': {{Archives by months|2014}}}}</nowiki>
<nowiki>}}</nowiki> </pre>
| style="vertical-align:top;" | {{archive box |search=yes |index=/Archive index |collapsible=yes |bot=ClueBot III |age=90
|style=background-color:#F8EABA; border-color:#C0C090; <!-- This style parameter is so the box shows up in the same colors as would normally appear on a talk page. It is only for this as an example. -->
|
{{nowrap|'''2004''': {{Archives by months|2004}}}}
{{nowrap|'''2005''': {{Archives by months|2005}}}}
{{nowrap|'''2006''': {{Archives by months|2006}}}}
{{nowrap|'''2007''': {{Archives by months|2007}}}}
{{nowrap|'''2008''': {{Archives by months|2008}}}}
{{nowrap|'''2009''': {{Archives by months|2009}}}}
{{nowrap|'''2010''': {{Archives by months|2010}}}}
{{nowrap|'''2011''': {{Archives by months|2011}}}}
{{nowrap|'''2012''': {{Archives by months|2012}}}}
{{nowrap|'''2013''': {{Archives by months|2013}}}}
{{nowrap|'''2014''': {{Archives by months|2014}}}}
}}
|}

The archive box to the right is what is produced by the above code. The example here has no month names which are links because there are no archive files for this page.

If your archives were stored in pages with names of the format <kbd>Talk:YourPage/Archive/YYY/mmm</kbd> then you would typically use:

{| border="0"
|-
| colspan="2" | The most common general option is by using the {{tl|Archives by months}} template to generate links to your existing archives. It produces a live link for each existing archive month within a year. It is commonly used in something similar to (delete the lines for the years you don't want):<br />
|-
| width="300" |<pre><nowiki>{{archive box |search=yes |index=/Archive index |collapsible=yes |
bot=ClueBot III |age=90 | </nowiki>
<nowiki>{{nowrap|'''2004''': {{Archives by months|2004|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2005''': {{Archives by months|2005|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2006''': {{Archives by months|2006|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2007''': {{Archives by months|2007|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2008''': {{Archives by months|2008|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2009''': {{Archives by months|2009|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2010''': {{Archives by months|2010|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2011''': {{Archives by months|2011|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2012''': {{Archives by months|2012|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2013''': {{Archives by months|2013|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>{{nowrap|'''2014''': {{Archives by months|2014|archprefix=Archive/|abbrev3=yes}}}}</nowiki>
<nowiki>}}</nowiki> </pre>
| style="vertical-align:top;" | {{archive box |search=yes |index=/Archive index |collapsible=yes |bot=ClueBot III |age=90
|style=background-color:#F8EABA; border-color:#C0C090; <!-- This style parameter is so the box shows up in the same colors as would normally appear on a talk page. It is only for this as an example. -->
|
{{nowrap|'''2004''': {{Archives by months|2004|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2005''': {{Archives by months|2005|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2006''': {{Archives by months|2006|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2007''': {{Archives by months|2007|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2008''': {{Archives by months|2008|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2009''': {{Archives by months|2009|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2010''': {{Archives by months|2010|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2011''': {{Archives by months|2011|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2012''': {{Archives by months|2012|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2013''': {{Archives by months|2013|archprefix=Archive/|abbrev3=yes}}}}
{{nowrap|'''2014''': {{Archives by months|2014|archprefix=Archive/|abbrev3=yes}}}}
}}
|}
The archive box to the right is what is produced by the above code. As with the previous example, the example here has no month names which are links because there are no archive files for this page.

==Similarities to <kbd><nowiki>{{Month-year archive nav}}</nowiki></kbd>==
This template is a fork of {{tl2|Month-year archive nav}} except that it doesn't display the year. The months on this template do not have a CSS style either. This fork was created because {{tl2|Month-year archive nav}} is heavily used on Wikipedia and any changes to it could be disruptive.

{{Warchivenav}}

<includeonly>
[[Category:Archival templates]]
</includeonly>
Anonymous user

Navigation menu