Wikipedia:Wikipedia Signpost/Templates/Single/doc
This is a documentation subpage for Wikipedia:Wikipedia Signpost/Templates/Single. It may contain usage information, categories and other content that is not part of the original wikipedia page. |
Usage
editVery 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:
- Transcludes Wikipedia:Wikipedia Signpost/Single.
- Gives it the parameter
{{#titleparts:{{FULLPAGENAME}}|3|3}}
.
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]]