Generating dynamic content with MediaWiki/2009/W37

From Wikiversity
Jump to navigation Jump to search

/W35 | /W36 | /W37

Now I'm in the future talking from...

W{{#time:W|{{subst:CURRENTTIMESTAMP}}}} => W36

And you will be here from...

W{{#time:W|{{CURRENTTIMESTAMP}}}} => W17

The week structure[edit | edit source]

{{W17 : Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday

Friday

Generating Next Week... => Generating dynamic content with MediaWiki/2009/W18

2009/W37

Navigation[edit | edit source]

A little navigation machine that freezes our current working queue for weeks can look like:

2009 /W36 /W37 /W38

It looks pretty simple, but to make it work on any subpage of any page in any namespace the code is:

{| class="prettytable"
![[{{#titleparts:{{FULLPAGENAME}}|1|1}}/{{#time:Y|{{subst:CURRENTTIMESTAMP}}}}|{{#time:Y|{{subst:CURRENTTIMESTAMP}}}}]]
|[[{{#titleparts:{{FULLPAGENAME}}|2|1}}/W{{#expr:{{#time:W|{{subst:CURRENTTIMESTAMP}}}}-1}}|/W{{#expr:{{#time:W|{{subst:CURRENTTIMESTAMP}}}}-1}}]]
|[[{{#titleparts:{{FULLPAGENAME}}|2|1}}/W{{#time:W|{{subst:CURRENTTIMESTAMP}}}}|/W{{#time:W|{{subst:CURRENTTIMESTAMP}}}}]]
|[[{{#titleparts:{{FULLPAGENAME}}|2|1}}/W{{#expr:{{#time:W|{{subst:CURRENTTIMESTAMP}}}}+1}}|/W{{#expr:{{#time:W|{{subst:CURRENTTIMESTAMP}}}}+1}}]]
|}

See also[edit | edit source]

User:CQ/2007