Difference between revisions of "Template:Elemental Rumble"
From Dungeon Defenders 2 Wiki
(Testing and formatting rotating weekly element) |
|||
Line 12: | Line 12: | ||
* Then loops back to Week 1 | * Then loops back to Week 1 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
Line 35: | Line 23: | ||
</noinclude> | </noinclude> | ||
+ | <includeonly> | ||
+ | <!-- Weekly Image Rotator (changes every 7 days based on ISO week number) --> | ||
+ | {{#switch: {{#expr: {{#time:W}} mod 4 }} | ||
+ | | 0 = [[File:Water Week.gif|300px]] | ||
+ | | 1 = [[File:Storm Week.gif|300px]] | ||
+ | | 2 = [[File:Earth Week.gif|300px]] | ||
+ | | 3 = [[File:Fire Week.gif|300px]] | ||
+ | | #default = [[File:Water Week.gif|300px]] | ||
+ | }} | ||
+ | </includeonly> |
Revision as of 15:11, 2 April 2025
This template displays a different image each week, rotating through 4 images based on the current ISO week number (168-hour cycles). To use it, simply type:
{{WeeklyImageRotation}}
The rotation order is:
Example
Wiki Text | Result |
---|---|
{{WeeklyImageRotation}}
|
Template:WeeklyImageRotation |