Template:Weekly site information/doc: Difference between revisions
Appearance
Dat Hack3r (talk | contribs) Created template documentation. |
Dat Hack3r (talk | contribs) Added {{Lua}}. |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Tlx|Weekly site information}} generates | {{High priority}} | ||
{{Lua|Module:Weekly site information}} | |||
{{Tlx|Weekly site information}} generates links to Weekly Briefing Releases. To use it, [[MW:Transclusion|transclude]] the template, and it will automatically insert a link to the most recent Weekly Briefing Release, determined automatically according to the release schedule. If the most recent Weekly Briefing Release is unavailable, the template automatically links to the last existing release. | |||
* {{Tlx|Weekly site information}} → | * {{Tlx|Weekly site information}} → | ||
*: {{Weekly site information}} | *: {{Weekly site information}} | ||
By default, the link displays as "Weekly Site Information". To display custom text, pass the custom text as the first parameter: | |||
* {{Tlx|Weekly site information|Weekly Briefing}} → | * {{Tlx|Weekly site information|Weekly Briefing}} → | ||
*: {{Weekly site information|Weekly Briefing}} | *: {{Weekly site information|Weekly Briefing}} | ||
This template can also display a previous Weekly Briefing Release relative to the current Release using {{para|offset}}: | |||
* {{Tlx|Weekly site information|2=offset=-1}} → | |||
*: {{Weekly site information|offset=-1}} | |||
* {{Tlx|Weekly site information|Weekly Briefing|3=offset=-1}} → | |||
*: {{Weekly site information|Weekly Briefing|offset=-1}} | |||
== TemplateData == | |||
<templatedata> | |||
{ | |||
"description": "This template generates links to Weekly Briefing Releases.", | |||
"params": { | |||
"1": { | |||
"label": "Link text", | |||
"description": "Text to display for the generated link", | |||
"type": "string", | |||
"example": "Weekly Briefing", | |||
"default": "Weekly Site Information" | |||
}, | |||
"offset": { | |||
"label": "Offset", | |||
"description": "How many releases prior to the current one to link to.", | |||
"example": "-1", | |||
"type": "number", | |||
"default": "0" | |||
} | |||
}, | |||
"format": "inline", | |||
"maps": { | |||
"a": {}, | |||
"asd": {} | |||
} | |||
} | |||
</templatedata> |