Template:Weekly site information/doc: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
Dat Hack3r (talk | contribs)
Created template documentation.
 
Dat Hack3r (talk | contribs)
Update documentation to reflect new functionality
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Tlx|Weekly site information}} generates a link to the most recent Weekly Briefing Release. To use it, [[MW:Transclusion|transclude]] the template, and it will automatically insert a link to the most recent Weekly Briefing Release, evaluated based on the release schedule. If the expected most recent Weekly Briefing Release does not exist, it will fall back to the previous Weekly Briefing 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}}


The default text displayed by the link is "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}}
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}} →
*: {{Weekly site information|offset=-1}}
* {{Tlx|Weekly site information|The previous expected release|3=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>
{
"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": "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, 0, 1",
"type": "number",
"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",
"paramOrder": [
"1",
"number",
"offset"
]
}
</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