Difference between revisions of "Template:Numerical titles"
Jump to navigation
Jump to search
(attempt adding full/5X5 distinction) |
m (formatted uniformly) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch: {{#sub:{{{page}}}|0|11}}| SGU Episode = {{#switch: {{#len:{{#sub:{{{page}}}|12|0}}}} |1 = [[Category:{{{category}}}|# 00{{#sub:{{{page}}}|12|0}}]]|2 = [[Category:{{{category}}}|# 0{{#sub:{{{page}}}|12|0}}]]|3 = [[Category:{{{category}}}|# {{#sub:{{{page}}}|12|0}}]]}}| 5X5 Episode = {{#switch: {{#len:{{#sub:{{{page}}}|12|0}}}} |1 = [[Category:{{{category}}}|# ~00{{#sub:{{{page}}}|12|0}}]]|2 = [[Category:{{{category}}}|# ~0{{#sub:{{{page}}}|12|0}}]]|3 = [[Category:{{{category}}}|# ~{{#sub:{{{page}}}|12|0}}]]}} }}<noinclude> | {{#switch: {{#sub:{{{page}}}|0|11}}| SGU Episode = {{#switch: {{#len:{{#sub:{{{page}}}|12|0}}}} |1 = [[Category:{{{category}}}|# 00{{#sub:{{{page}}}|12|0}}]]|2 = [[Category:{{{category}}}|# 0{{#sub:{{{page}}}|12|0}}]]|3 = [[Category:{{{category}}}|# {{#sub:{{{page}}}|12|0}}]]}}| 5X5 Episode = {{#switch: {{#len:{{#sub:{{{page}}}|12|0}}}} |1 = [[Category:{{{category}}}|# ~00{{#sub:{{{page}}}|12|0}}]]|2 = [[Category:{{{category}}}|# ~0{{#sub:{{{page}}}|12|0}}]]|3 = [[Category:{{{category}}}|# ~{{#sub:{{{page}}}|12|0}}]]}} }}<noinclude> | ||
=== Description === | === Description === | ||
− | This template allows a transcript page (full or 5X5) to be categorized with a sortkey that ensures the proper numerical order. For example: | + | This template allows a transcript page (full or 5X5) to be categorized with a sortkey that ensures the proper numerical order and separation of full and 5X5 episodes. For example: |
* SGU Episode 2 | * SGU Episode 2 | ||
* SGU Episode 35 | * SGU Episode 35 | ||
* SGU Episode 143 | * SGU Episode 143 | ||
+ | * 5X5 Episode 5 | ||
+ | * 5X5 Episode 42 | ||
+ | * 5X5 Episode 100 | ||
Without this sort key, page names are sorted as a string, and the episodes in the above example would be listed on the category page as: | Without this sort key, page names are sorted as a string, and the episodes in the above example would be listed on the category page as: | ||
+ | * 5X5 Episode 100 | ||
+ | * 5X5 Episode 42 | ||
+ | * 5X5 Episode 5 | ||
* SGU Episode 143 | * SGU Episode 143 | ||
* SGU Episode 2 | * SGU Episode 2 | ||
Line 15: | Line 21: | ||
=== Usage === | === Usage === | ||
There are two compulsory parameters: | There are two compulsory parameters: | ||
− | * page – the page to be categorized. When used in a template, this should be <code><nowiki>{{PAGENAME}}</nowiki></code>. | + | * <code>page</code> – the page to be categorized. When used in a template, this should be <code><nowiki>{{PAGENAME}}</nowiki></code>. |
− | * category – the category the page is to be added to. This is case sensitive. | + | * <code>category</code> – the category the page is to be added to. This is case sensitive. For a full list, see [[:Category:Topic]] |
− | <pre> | + | <pre>{{Numerical titles |
− | {{Numerical titles | + | |page = {{PAGENAME}} |
+ | |category = Science & Medicine | ||
+ | }}</pre> | ||
+ | |||
+ | === Copy === | ||
+ | <pre>{{Numerical titles | ||
|page = | |page = | ||
|category = | |category = | ||
− | }} | + | }}</pre> |
− | </pre> | + | [[Category:Utility templates]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</noinclude> | </noinclude> |
Latest revision as of 09:59, 3 September 2013
Description
This template allows a transcript page (full or 5X5) to be categorized with a sortkey that ensures the proper numerical order and separation of full and 5X5 episodes. For example:
- SGU Episode 2
- SGU Episode 35
- SGU Episode 143
- 5X5 Episode 5
- 5X5 Episode 42
- 5X5 Episode 100
Without this sort key, page names are sorted as a string, and the episodes in the above example would be listed on the category page as:
- 5X5 Episode 100
- 5X5 Episode 42
- 5X5 Episode 5
- SGU Episode 143
- SGU Episode 2
- SGU Episode 35
This template is useful when categories are applied automatically, using another template (e.g. Template:Editing required).
Usage
There are two compulsory parameters:
page
– the page to be categorized. When used in a template, this should be{{PAGENAME}}
.category
– the category the page is to be added to. This is case sensitive. For a full list, see Category:Topic
{{Numerical titles |page = {{PAGENAME}} |category = Science & Medicine }}
Copy
{{Numerical titles |page = |category = }}