Template:ArchivesEdit This Page

From FamilySearch Wiki

(Difference between revisions)
(change link to internal page)
(align image center, reduce font)
 
Line 1: Line 1:
<!-- Template:Archives begins -->{| class="{{talk other |tmbox tmbox-notice |ombox ombox-notice |demospace={{{demospace|}}}}} mbox-small {{#ifeq:{{{collapsed|}}}|yes|collapsible collapsed|{{#ifeq:{{{collapsible|}}}|yes|collapsible}}}}" style="text-align: center; {{#if:{{{box-width|}}}|width:{{{box-width}}};}} {{{style|}}}"
+
<!-- Template:Archives begins -->{| class="{{talk other |tmbox tmbox-notice |ombox ombox-notice |demospace={{{demospace|}}}}} mbox-small {{#ifeq:{{{collapsed|}}}|yes|collapsible collapsed|{{#ifeq:{{{collapsible|}}}|yes|collapsible}}}}" style="text-align: center; font-size: 85%; {{#if:{{{box-width|}}}|width:{{{box-width}}};}} {{{style|}}}"
 
|-
 
|-
! {{Image|alt={{{alt|}}}{{#if:{{#ifeq:{{{link|::none::}}}|::none::|{{{alt|}}}}}||{{!}}link={{{link|}}}}}|{{{image|Filing cabinet.png}}}|{{{image-size|40px}}}}}<br />{{{title|[[Help:Archiving a talk page|Archives]]}}} {{#if:{{{index|}}}|([[{{#rel2abs: {{{index}}} }}|Index]])}}
+
! style="text-align: center" | {{Image|alt={{{alt|}}}{{#if:{{#ifeq:{{{link|::none::}}}|::none::|{{{alt|}}}}}||{{!}}link={{{link|}}}}}|{{{image|Filing cabinet.png}}}|{{{image-size|40px}}}}}<br />{{{title|[[Help:Archiving a talk page|Archives]]}}} {{#if:{{{index|}}}|([[{{#rel2abs: {{{index}}} }}|Index]])}}
 
|-
 
|-
 
| style="text-align:left;" | {{{list| {{#switch:{{{auto|¬}}} |no= |long={{Archive list long|{{#if:{{{root|}}}|root}}={{{root}}} }} |¬={{#ifexist:{{#rel2abs:{{{archivelist|./archivelist}}}}} |{{ {{#rel2abs:{{{archivelist|./archivelist}}} }} }} |{{Archive list long|{{#if:{{{root|}}}|root}}={{{root}}} }} }} |#default=<div style="text-align:center;">{{Archive list|{{#if:{{{root|}}}|root}}={{{root}}} }}</div>}} }}}{{{1|}}}
 
| style="text-align:left;" | {{{list| {{#switch:{{{auto|¬}}} |no= |long={{Archive list long|{{#if:{{{root|}}}|root}}={{{root}}} }} |¬={{#ifexist:{{#rel2abs:{{{archivelist|./archivelist}}}}} |{{ {{#rel2abs:{{{archivelist|./archivelist}}} }} }} |{{Archive list long|{{#if:{{{root|}}}|root}}={{{root}}} }} }} |#default=<div style="text-align:center;">{{Archive list|{{#if:{{{root|}}}|root}}={{{root}}} }}</div>}} }}}{{{1|}}}

Latest revision as of 17:16, 2 November 2010


Archives
[view] [edit] [history] [purge] Documentation icon Template documentation

The {{archives}} 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.

Contents

Usage

{{archives
 |archivelist= /archivelist
 |auto=        <short|long|no>
 |index=       /Archive index
 |search=      <yes|no>
 |list=        
 |collapsible= <yes|no>
 |collapsed=   <yes|no>
 |style=       
 |title=       
 |image=       
 |alt=         
 |link=        
 |bot=         
 |age=         
}}

Parameters

archivelist
Specifies a link to a subpage, such as "/archivelist" that contains the archive list. See the "Archive list" and "Additional notes" sections below for further important details.
auto= <short|long|no>
Specifies the format of the auto-generated archive list. If left unspecified, the default is "long"; any other word (except "no") will result in "short" and "no" disables auto-detection.
index
Adds an "Index" link in the title to a specified subpage, such as "/Archive index" that should be the subject index page for all archived discussions. HBC Archive Indexerbot can automatically generate such indexes.
search
If yes, adds a search box to the template.
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.
collapsible 
If yes, makes the list collapsible.
collapsed 
If yes, makes the list collapsed.
style 
An arbitrary string of CSS can be applied to the box (use with care).
title 
An alternate title, defaults to a bolded "Archives".
image 
An alternate image to be used, defaults to "Replacement filing cabinet.svg".
link 
Link for the image. This normally defaults to empty, which means no link. However, if alt is nonempty, it defaults to the image's file page.
alt 
Alt text for the image, for visually impaired readers. See WP:ALT. This defaults to empty. If a nonempty value is specified for link, alt should be nonempty too, and should indicate what will happen if the user clicks on the image.
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 "{{PAGENAME}}/archivelist" 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 "{{PAGENAME}}/archivelist", which can then be used to begin manually populating the list, if desired.

If the "auto" parameter is specified, the "Edit" link is removed. The "long" auto format (the default) indicates "Archive 1", "Archive 2", and so on. The "short" 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.

An archive list can also be passed in the first unnamed parameter avoiding the need for a subpage.

Using "auto=no" will disable archive auto-detection. Manually specified archives will still be shown.

Additional notes

The "auto" and "archivelist" 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, "{{PAGENAME}}/Archive 1", "{{PAGENAME}}/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 renamed to conform, or a manual list can be maintained.

Specifying "auto" with any right-hand-side value other than "long" or "no" results in the short-format list; the use of "short" as the value just makes things more obvious to others.

The short and long auto lists are generated by {{archive list}} and {{archive list long}}, respectively. They are limited to a maximum of 100 and 36 subpages, respectively. 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.

Examples

Default
{{archives}}

Archives
Short, index
{{archives
 |auto= short
 |index= /Archive index
}}

Archives (Index)
no archives yet (create)

See also

  • This page was last modified on 2 November 2010, at 17:16.
  • This page has been accessed 582 times.