Template:Weekly site information/doc: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
Dat Hack3r (talk | contribs)
Updated template documentation and TemplateData to document new functionality.
Dat Hack3r (talk | contribs)
Update documentation to reflect new functionality
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{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.
{{High priority}}
{{Lua|Module:Weekly site information}}
{{Tlx|Weekly site information}} generates links to [[Weekly Briefing]] releases. When [[MW:Transclusion|transcluded]], it will automatically display a link to the most recent Weekly Briefing release based on the release schedule. If the predicted release title is unavailable, the template automatically links to the last existing release. This functionality does not apply when {{para|number}} or {{para|offset}} are given.


* {{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:
By default, the link displays as "Weekly Site Information". To display custom text, pass the custom text as the first positional 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}}:
Use {{para|number}} to get a link to a specific release number.
 
* {{Tlx|Weekly site information|2=number=2}} →
*: {{Weekly site information|number=2}}
* {{Tlx|Weekly site information|The second Weekly Briefing release|3=number=2}} →
*: {{Weekly site information|The second Weekly Briefing release|number=2}}
 
This template can also display a past, present, or future Weekly Briefing release if {{para|offset}} is specified. This offset applies to the number given by {{para|number}} if it is present; otherwise, the offset is relative to the current expected release. A link will be produced regardless of whether the predicted release exists.


* {{Tlx|Weekly site information|2=offset=-1}} →
* {{Tlx|Weekly site information|2=offset=-1}} →
*: {{Weekly site information|offset=-1}}
*: {{Weekly site information|offset=-1}}
* {{Tlx|Weekly site information|Weekly Briefing|3=offset=-1}} →
* {{Tlx|Weekly site information|The previous expected release|3=offset=-1}} →
*: {{Weekly site information|Weekly Briefing|offset=-1}}
*: {{Weekly site information|The previous expected release|offset=-1}}
* {{Tlx|Weekly site information|The current expected release|3=offset=0}} →
*: {{Weekly site information|The current expected release|offset=0}}
* {{Tlx|Weekly site information|The next expected release|3=offset=1}} →
*: {{Weekly site information|The next expected release|offset=1}}
* {{Tlx|Weekly site information|The release after the second|3=number=2|4=offset=1}} →
*: {{Weekly site information|The release after the second|number=2|offset=1}}


== TemplateData ==
== TemplateData ==
<templatedata>
<templatedata>
{
{
"description": "This template generates links to Weekly Briefing Releases.",
"description": "This template generates links to Weekly Briefing releases.",
"params": {
"params": {
"1": {
"1": {
Line 30: Line 45:
"offset": {
"offset": {
"label": "Offset",
"label": "Offset",
"description": "How many releases prior to the current one to link to.",
"description": "An offset that can specify a past, present, or future Weekly Briefing release by being applied to the \"number\" parameter if given or the current expected release otherwise, always producing a link even if the release does not exist",
"example": "-1",
"example": "-1, 0, 1",
"type": "number",
"type": "number",
"default": "0"
"default": "0"
},
"number": {
"label": "Release number",
"description": "The number of a specific release to link to",
"example": "2",
"type": "number",
"default": "The current release number"
}
}
},
},
"format": "inline",
"format": "inline",
"maps": {
"paramOrder": [
"a": {},
"1",
"asd": {}
"number",
}
"offset"
]
}
}
</templatedata>
</templatedata>

Latest revision as of 03:21, 1 February 2026

{{Weekly site information}} generates links to Weekly Briefing releases. When transcluded, it will automatically display a link to the most recent Weekly Briefing release based on the release schedule. If the predicted release title is unavailable, the template automatically links to the last existing release. This functionality does not apply when |number= or |offset= are given.

By default, the link displays as "Weekly Site Information". To display custom text, pass the custom text as the first positional parameter.

Use |number= to get a link to a specific release number.

This template can also display a past, present, or future Weekly Briefing release if |offset= is specified. This offset applies to the number given by |number= if it is present; otherwise, the offset is relative to the current expected release. A link will be produced regardless of whether the predicted release exists.

TemplateData

This template generates links to Weekly Briefing releases.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Link text1

Text to display for the generated link

Default
Weekly Site Information
Example
Weekly Briefing
Stringoptional
Release numbernumber

The number of a specific release to link to

Default
The current release number
Example
2
Numberoptional
Offsetoffset

An offset that can specify a past, present, or future Weekly Briefing release by being applied to the "number" parameter if given or the current expected release otherwise, always producing a link even if the release does not exist

Default
0
Example
-1, 0, 1
Numberoptional