Template:Wikiportal/OTD: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><onlyinclude><!-- | <includeonly><onlyinclude><!-- | ||
-->{{#if:{{{prefix|}}}|<!-- | -->{{#if:{{{prefix|}}}|<!-- | ||
-->{{#switch:{{lc:{{{mode}}}}}<!-- | -->{{#switch:{{lc:{{{mode}}}}}<!-- | ||
-->|daily=<!-- | -->|daily=|#default=<!-- | ||
-->{{{{{prefix}}}/{{CURRENTMONTHNAME}} {{CURRENTDAY | -->{{{{{prefix}}}/{{CURRENTMONTHNAME}} {{CURRENTDAY}}}}<!-- | ||
-->|monthly| | -->|monthly|<!-- | ||
-->{{{{{prefix}}}/{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<!-- | -->{{{{{prefix}}}/{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<!-- | ||
| Line 16: | Line 17: | ||
-->|{{terr|"prefix" not set}}}}<!-- | -->|{{terr|"prefix" not set}}}}<!-- | ||
--></onlyinclude></includeonly> | --></onlyinclude></includeonly> | ||
<noinclude> | <noinclude> | ||
Template for displaying [[Datacron Database:OTD|OTD]] on [[:Category:Portals|portal pages]]. | Template for displaying [[Datacron Database:OTD|OTD]] on [[:Category:Portals|portal pages]]. | ||
Supports | Supports 1 method of selecting articles: | ||
* '''Daily rotation''': Display a rotation of 366 articles based on day of the year. | * '''Daily rotation''': Display a rotation of 366 articles based on day of the year. | ||
| Line 30: | Line 28: | ||
<pre> | <pre> | ||
{{Wikiportal/OTD | {{Wikiportal/OTD | ||
|mode = | |mode =daily | ||
|prefix =Wikiportal:Main/OTD | |prefix =Wikiportal:Main/OTD | ||
}} | }} | ||
| Line 41: | Line 39: | ||
For example, if <code>prefix</code> is set to "Wikiportal:Datacron Database/OTD", the featured articles should be named: | For example, if <code>prefix</code> is set to "Wikiportal:Datacron Database/OTD", the featured articles should be named: | ||
* "Template:Wikiportal:Datacron Database/OTD/January 1 | * "Template:Wikiportal:Datacron Database/OTD/January 1" (up to "Template:Wikiportal:Datacron Database/OTD/December 31") for the daily rotation. | ||
<code>mode</code> Determines type of rotation. | <code>mode</code> Determines type of rotation. | ||
Available options: | Available options: | ||
* '''daily''': 366-article-rotation based on day of the year. | * '''daily''': 366-article-rotation based on day of the year. | ||
==Examples== | ==Examples== | ||
===Daily rotation (366 articles)=== | ===Daily rotation (366 articles)=== | ||
<pre> | <pre> | ||
{{Wikiportal/ | {{Wikiportal/News | ||
|prefix =Wikiportal:Main/OTD | |prefix =Wikiportal:Main/OTD | ||
|mode =daily | |mode =daily | ||
| Line 98: | Line 56: | ||
|- | |- | ||
| | | | ||
{{Wikiportal/ | {{Wikiportal/News | ||
|prefix =Wikiportal:Main/OTD | |prefix =Wikiportal:Main/OTD | ||
|mode =daily | |mode =daily | ||
}} | }} | ||
|} | |} | ||
</noinclude> | |||
</noinclude> | </noinclude> | ||
[[Category:Portal templates|Featured article]] | [[Category:Portal templates|Featured article]] | ||
Revision as of 22:19, 19 December 2025
Template for displaying OTD on portal pages.
Supports 1 method of selecting articles:
- Daily rotation: Display a rotation of 366 articles based on day of the year.
Usage
{{Wikiportal/OTD
|mode =daily
|prefix =Wikiportal:Main/OTD
}}
The featured articles should all be subpages of a certain page (specified with prefix).
Parameters
Name of the template (without "Template:") which the featured articles are subpages of.
For example, if prefix is set to "Wikiportal:Datacron Database/OTD", the featured articles should be named:
- "Template:Wikiportal:Datacron Database/OTD/January 1" (up to "Template:Wikiportal:Datacron Database/OTD/December 31") for the daily rotation.
mode Determines type of rotation.
Available options:
- daily: 366-article-rotation based on day of the year.
Examples
Daily rotation (366 articles)
{{Wikiportal/News
|prefix =Wikiportal:Main/OTD
|mode =daily
}}
results in the following featured article to be displayed today: