Difference between revisions of "Template:ArchiveNotice/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Kb.au
(added TemplateData)
blackwiki>Kb.au
(formatting)
Line 28: Line 28:
 
|period=90 days
 
|period=90 days
 
|style = background-color:#eaa;border:1px solid #aaa;}}
 
|style = background-color:#eaa;border:1px solid #aaa;}}
 +
 +
==TemplateData==
 +
<templatedata>
 +
{
 +
    "params": {
 +
        "icon": {},
 +
        "style": {
 +
            "label": "Style",
 +
            "description": "CSS values to specify a different style for the box.",
 +
            "type": "string"
 +
        },
 +
        "period": {
 +
            "label": "Period",
 +
            "description": "Period after which content is archived.",
 +
            "example": "7 days",
 +
            "type": "string"
 +
        },
 +
        "archive": {
 +
            "label": "Archive link",
 +
            "description": "To specify a different link to the \"archive\", for instance in cases of page renames/moves.",
 +
            "example": "Talk:Example/Past Discussions",
 +
            "type": "string"
 +
        },
 +
        "category": {}
 +
    },
 +
    "description": "A message box that can be placed on pages being archived",
 +
    "format": "block"
 +
}
 +
</templatedata>
 +
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
Line 33: Line 63:
 
[[Category:Talk header templates|{{PAGENAME}}]]
 
[[Category:Talk header templates|{{PAGENAME}}]]
 
}}</includeonly>
 
}}</includeonly>
<templatedata>
 
{
 
"params": {
 
"icon": {},
 
"style": {
 
"label": "Style",
 
"description": "CSS values to specify a different style for the box.",
 
"type": "string"
 
},
 
"period": {
 
"label": "Period",
 
"description": "Period after which content is archived.",
 
"example": "7 days",
 
"type": "string"
 
},
 
"archive": {
 
"label": "Archive link",
 
"description": "To specify a different link to the \"archive\", for instance in cases of page renames/moves.",
 
"example": "Talk:Example/Past Discussions",
 
"type": "string"
 
},
 
"category": {}
 
},
 
"description": "A message box that can be placed on pages being archived",
 
"format": "block"
 
}
 
</templatedata>
 

Revision as of 19:20, 9 January 2018

Usage

This is the {{ArchiveNotice}} message box.

It can be placed at the top of pages being archived. But some users like to place it both at the top and the bottom of the pages being archived.

Note! Do not subst this template!

Usually this template needs no parameters. But you can add optional parameters to specify a different link to the "archive", for instance in cases of page renames/moves. Like this:

{{ArchiveNotice|archive=Archive/2016}}

If you want to specify a period after which content is being archived, you can use |period = 90 days (as an example) as an optional parameter. The period parameter is freeform so you can use whatever format you like.

If you want to specify a different style for the box, you can use |style = CSS values.

Example

A full example would therefore be:

{{ArchiveNotice
|archive=Archive/2016
|period=90 days
|style = background-color:#eaa;border:1px solid #aaa;}}

and would yield:

TemplateData

A message box that can be placed on pages being archived

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Iconicon

no description

Unknownoptional
Stylestyle

CSS values to specify a different style for the box.

Stringoptional
Periodperiod

Period after which content is archived.

Example
7 days
Stringoptional
Archive linkarchive

To specify a different link to the "archive", for instance in cases of page renames/moves.

Example
Talk:Example/Past Discussions
Stringoptional
Categorycategory

no description

Unknownoptional