Difference between revisions of "MagazineName"

From Sega Retro

Line 11: Line 11:
 
|format=template
 
|format=template
 
|template=MagazineName/Issue
 
|template=MagazineName/Issue
}}}}{{#ifeq:{{#var:mname}}|{{#var:mnum}}|{{clearvar|mname}}}}
+
}}}}{{#ifeq:{{#var:mname}}|{{#var:mnum}}|{{clearvar|mname}}}} {{
{{#if: {{#var:mname}}  
+
#if: {{#var:mname}}  
 
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}: "{{#var:mname}}"}}  
 
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}: "{{#var:mname}}"}}  
 
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}}}  
 
| {{#vardefine:mnamefull|<nowiki>#</nowiki>{{#var:mnum}}}}  
Line 52: Line 52:
 
| {{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}
 
| {{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}
 
|}
 
|}
 +
 
[[Category:Magazine templates]]</noinclude>
 
[[Category:Magazine templates]]</noinclude>

Revision as of 10:34, 14 October 2018

This template generates a full name for a magazine, given a name and an issue number (either a number or a date). This saves having to look up precise release dates of magazines, and should greatly speed up the creation of lists of articles.

Use

{{MagazineName|<name>|<issueno>|nomagname=|noissuename=|nopubdate=}}

By default this returns a long string - parts can be omitted using the |no(x) fields.

Examples

Code Result
{{MagazineName|dmuk}}
Dreamcast Magazine (UK)
{{MagazineName|dmuk|12}}
Dreamcast Magazine (UK) #12: "No. 12" (2000-08-10)
{{MagazineName|dmuk|12|nomagname=yes}}
#12: "No. 12" (2000-08-10)
{{MagazineName|dmuk|12|noissuename=yes}}
Dreamcast Magazine (UK) 2000-08-10
{{MagazineName|dmuk|12|nopubdate=yes}}
Dreamcast Magazine (UK) #12: "No. 12"
{{MagazineName|dmuk|12|nomagname=yes|nopubdate=yes}}
#12: "No. 12"
{{MagazineName|dmuk|12|nomagname=yes|noissuename=yes}}
2000-08-10
{{MagazineName|dmuk|12|noissuename=yes|nopubdate=yes}}
Dreamcast Magazine (UK)