Difference between revisions of "Template:Map"

From DoomWiki.org

(+ caveats arising from the markup change to categorize unnamed maps by mod name. These cases Should Never Occur(TM) but we'll document them anyway)
(Sort nameless maps by mod name, then slot name (activating test code from Template:Map/test))
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}} {{#sub:{{PAGENAME}}|0|{{#expr:{{#pos:{{PAGENAME}}|(|0}}-1}}}}}}}}}[[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 15:53, 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). Ignored if the name parameter is used. This parameter may create strange results if the page title is not in the standard form SLOT (Mod Name).
  • name= overrides automatic detection of the title, for example to ignore a leading "The" or "A".