Template:Weekly site information/doc: Difference between revisions

From Our World of Text Wiki
Jump to navigation Jump to search
m (Improved TemplateData description.)
(Updated template documentation and TemplateData to document new functionality.)
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.
{{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}}


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 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 ==
<templatedata>
<templatedata>
{
{
"description": "This template generates a link to the most recent Weekly Briefing Release.",
"description": "This template generates links to Weekly Briefing Releases.",
"params": {
"params": {
"1": {
"1": {
Line 20: Line 27:
"example": "Weekly Briefing",
"example": "Weekly Briefing",
"default": "Weekly Site Information"
"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"
"format": "inline",
"maps": {
"a": {},
"asd": {}
}
}
}
</templatedata>
</templatedata>

Revision as of 20:26, 28 November 2024

{{Weekly site information}} generates links to Weekly Briefing Releases. To use it, 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.

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

This template can also display a previous Weekly Briefing Release relative to the current Release using |offset=:

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
Offsetoffset

How many releases prior to the current one to link to.

Default
0
Example
-1
Numberoptional