Template:Archives/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
m (1 revision: Importing archive template to tidy up community portal page.)
>Kaseki
(Replaced content with "{{WikipediaTemplate}}")
Line 1: Line 1:
{{Documentation subpage}}
{{WikipediaTemplate}}
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
The <code><nowiki>{{archives}}</nowiki></code> template may be used to add a box containing page links to archived discussions. It will automatically detect archived pages by default if they are named appropriately, eliminating the need to manually update the box each time a new archive page is created.
 
=== Usage ===
<pre>
{{archives
|archivelist= /archivelist
|auto=        <short|long|no>
|search=      <yes|no>
|list=       
|style=     
|title=       
|bot=       
|age=       
}}
</pre>
 
===Parameters===
; list: Inline list of archives. This is not needed if the pages are named "Archive 1", "Archive 2" and so on, in which case automatic archiving works, but can be used in addition to automatic archiving if additional pages with other names are available.
; style : An arbitrary string of CSS can be applied to the box (use with care).
; title : An alternate title, defaults to a bolded "Archives".
; bot : If specified, a note about automatic archiving will be shown.
; age : If specified, the archiving delay will be provided.
 
=== Archive list ===
By default (with no explicit parameters), the archive list presented in the box is determined automatically. If a subpage called "<code><nowiki>{{PAGENAME}}</nowiki>/archivelist</code>" exists, it will be used as the central content of the box. For an example, see [[Talk:Evolution]], which draws from [[Talk:Evolution/archivelist]]. 
 
If no archivelist subpage is detected, numbered archive subpages will be listed in long format. Such pages must be named as "/Archive #" because other naming styles will not be detected. If no subpages are found, the archivebox will contain only the "About" and "Edit" links, with the Edit link targeted at "<code><nowiki>{{PAGENAME}}</nowiki>/archivelist</code>", which can then be used to begin manually populating the list, if desired.
 
If the "<code>auto</code>" parameter is specified, the "Edit" link is removed. The "<code>long</code>" auto format (the default) indicates "Archive 1", "Archive 2", and so on. The "<code>short</code>" auto format indicates only the archive number. See more examples below.
 
If an archive list is specified, the name of the subpage is changed; otherwise, the behavior is the same.
 
Using "auto=no" will disable archive auto-detection. Manually specified archives will still be shown.
 
=== Additional notes ===
The "<code>auto</code>" and "<code>archivelist</code>" parameters are not intended to be used together. (Doing so removes the edit link, but will still use the specified archive list page if it exists.)
 
The auto-generated archive list requires subpages to use the common naming convention. That is, "<nowiki>{{PAGENAME}}</nowiki>/Archive 1", "<nowiki>{{PAGENAME}}</nowiki>/Archive 2", and so on. The letter "A" must be capitalized, there must be a single space between the word "Archive" and the number, and there must be no leading zeros. If archive subpages do not conform to this convention, they can be [[Help:Moving a page|renamed]] to conform, or a manual list can be maintained.
 
Specifying "<code>auto</code>" with any right-hand-side value other than "<code>long</code>" or "<code>no</code>" results in the short-format list; the use of "<code>short</code>" as the value just makes things more obvious to others.
 
The long auto lists are generated by {{tl|archive list long}}, limited to a maximum of 36 subpages (the short version {{tl|archive list}} with maximum of 100 subpages is obsolote now). Beyond those limits, additional subpages will not be listed. In such cases, a manually generated archive list subpage would need to be created and maintained.
See also {{tl|Archive box}}.
 
=== Examples ===
; Default
 
<code><nowiki>{{archives}}</nowiki></code>
{{archives}}
{{clear}}
 
; Short, index
 
<code><nowiki>{{</nowiki>archives
  |list = [[/Archive1]] [[/Archive2]]
  |index= /Archive index
<nowiki>}}</nowiki></code>
 
{{archives
  |list = [[/Archive1]] [[/Archive2]]
  |index= /Archive index
}}
{{clear}}
 
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Archival templates|{{PAGENAME}}]]
[[Category:Talk header templates|{{PAGENAME}}]]
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[simple:Template:Archives]]
[[zh:Template:Archives]]
 
</includeonly>

Revision as of 14:57, 22 February 2013

This template was adapted from Template:Archives/doc on Wikipedia.
Adaptation is noted for reference and attribution only. This template may differ from the original in function or in usage. The documentation on Wikipedia may be helpful in understanding this template.