Difference between revisions of "GameListNav"

From Sega Retro

 
Line 30: Line 30:
 
{{NavboxRow|content={{#vardefine:doneloop|}}{{#vardefine:i|0}}{{#vardefine:currentconsole|null}}{{#while:i
 
{{NavboxRow|content={{#vardefine:doneloop|}}{{#vardefine:i|0}}{{#vardefine:currentconsole|null}}{{#while:i
 
|{{#if:{{#var:currentconsole}}|true}}
 
|{{#if:{{#var:currentconsole}}|true}}
|{{#vardefine:currentconsole|{{Code2Format|{{#explode:amiga,st,c64,ibmpc,spectrum,pc,steam|,|{{#var:i}}}}}}}}{{#ifeq:{{#var:currentconsole}}|??|{{#vardefine:currentconsole|}}|{{#vardefine:page|List of {{#var:currentconsole}} games in {{#var:country}}}}{{#ifexist:{{#var:page}}|{{#if:{{#var:doneloop}}| {{!}} |{{#vardefine:doneloop|true}}}}[[{{#var:page}}|{{#var:currentconsole}}]]|}}}}{{incvar|i}}
+
|{{#vardefine:currentconsole|{{Code2Format|{{#explode:amiga,st,c64,ibmpc,msx,spectrum,pc,steam|,|{{#var:i}}}}}}}}{{#ifeq:{{#var:currentconsole}}|??|{{#vardefine:currentconsole|}}|{{#vardefine:page|List of {{#var:currentconsole}} games in {{#var:country}}}}{{#ifexist:{{#var:page}}|{{#if:{{#var:doneloop}}| {{!}} |{{#vardefine:doneloop|true}}}}[[{{#var:page}}|{{#var:currentconsole}}]]|}}}}{{incvar|i}}
 
}}
 
}}
 
}}
 
}}

Latest revision as of 11:38, 28 November 2021


Quick way of generating navboxes for game lists:

{{GameListNav|MD|US}}
Sega Mega Drive
Lists of Mega Drive games
Japan | United States of America | Germany | Spain | France | Portugal | United Kingdom | Italy | Australia | Canada | Brazil | South Korea | Taiwan
United States of America Lists of games in the United States
Master System | Mega Drive | Mega-CD | Game Gear | 32X | Pico | Saturn | Dreamcast
Wii | Wii U | Nintendo Switch | Game Boy Advance | Nintendo DS | Nintendo 3DS
PlayStation 2 | PlayStation 3 | PlayStation 4 | PlayStation 5 | PlayStation Portable | PlayStation Vita
Xbox | Xbox 360 | Xbox One | Xbox Series X
Windows PC