Wikipedia:Wikipedia Signpost/Templates/Single/doc

From Wikipedia, the free encyclopedia

Usage[edit]

Very simple. What it does is this:

{{Wikipedia:Wikipedia Signpost/Single|issuedate={{#titleparts:{{FULLPAGENAME}}|3|3}}}}

[[Category:Wikipedia Signpost Single archives {{#invoke:string|sub|{{#titleparts:{{FULLPAGENAME}}|3|3}}|1|4}}|{{#invoke:string|sub|{{#titleparts:{{FULLPAGENAME}}|3|3}}|6|7}}{{#invoke:string|sub|{{#titleparts:{{FULLPAGENAME}}|3|3}}|9|10}}]]

This looks monstrous. Here is what it does:

The magic word "titleparts" works like this:

Wikipedia:Wikipedia Signpost/Single/1969-12-31
          ^                  ^      ^
          1                  2      3

We can then take substrings of the third part:

1969-12-31
0000000001
1234567890
^  ^ ^^ ^^

i.e. 1 to 4 is 1969, 6 to 7 is 12 and 9 to 10 is 31.

So we are categorizing it like such: [[Category:Wikipedia Signpost Single archives 1969|1231]]