Difference between revisions of "Template:Map/test"

From DoomWiki.org

(to smooth out interaction between this and Template:Map skel, don't even attempt to add content categories when outside mainspace)
 
(test sortkey for unnamed maps)
Line 1: Line 1:
 
<div class="dw-div-dl">''This level occupies the map slot {{uc:{{{slot}}}}}. For other maps which occupy this slot, see [[:Category:{{uc:{{{slot}}}}}]].''</div>
 
<div class="dw-div-dl">''This level occupies the map slot {{uc:{{{slot}}}}}. For other maps which occupy this slot, see [[:Category:{{uc:{{{slot}}}}}]].''</div>
{{#ifeq:{{NAMESPACENUMBER}}|0|<includeonly>{{#ifeq: {{lc:{{{nocat|false}}}}} | false |{{DEFAULTSORT:{{{name|{{#sub:{{#sub:{{PAGENAME}}|{{#pos:{{PAGENAME}}| |0}}|0}}|0|0}}}}}}} [[Category:{{uc:{{{slot}}}}}]][[Category:Levels by name]]
+
{{#ifeq:{{NAMESPACENUMBER}}|0|<includeonly>{{#ifeq:{{lc:{{{nocat|false}}}}}|false|{{DEFAULTSORT:{{{name|{{#sub:{{PAGENAME}}|{{#pos:{{PAGENAME}}| |0}}|0}}}}}}}[[Category:{{uc:{{{slot}}}}}]][[Category:Levels by name]]|{{#ifeq:{{lc:{{{nocat|}}}}}|noname|{{DEFAULTSORT:{{{name|{{#sub:{{PAGENAME}}|{{#expr:{{#pos:{{PAGENAME}}|(|0}}+1}}|0}}}}}}}[[Category:{{uc:{{{slot}}}}}]][[Category:Levels without name]]|<!-- Category suppressed -->}}}}</includeonly>|}}<noinclude>
| {{#ifeq: {{lc:{{{nocat|}}}}} | noname | [[Category:{{uc:{{{slot}}}}}]][[Category:Levels without name]] | <!-- Category suppressed --> }}}}</includeonly>|}}<noinclude>
 
  
 
=== Usage ===
 
=== Usage ===

Revision as of 11:24, 11 March 2018

This level occupies the map slot {{{SLOT}}}. For other maps which occupy this slot, see [[:Category:{{{SLOT}}}]].


Usage

{{map}} categorizes a map by its number, and outputs a disambiguation notice linking to that category. This should be placed at the top of every map article (see also Template:Map skel).

Required parameter:

  • slot= is the level number in the Doom engine's usual format, e.g. E2M1 or MAP05.

Optional parameters:

  • nocat=true suppresses categorization; use for single-map mods.
  • nocat=noname invokes the subcategory for levels without individual titles (e.g. Galaxia).
  • name= overrides automatic detection of the title, for example to ignore a leading "The" or "A".