Difference between revisions of "Template:Infobox album/link"

From Communpedia
Jump to: navigation, search
(Created page with "{{#switch:{{lc:{{{1|}}}}} |extended play|ep|extended play|ep=EP |studio album|studio album|album|album|original studio album|lp|studio|cover...")
 
 
Line 1: Line 1:
 
{{#switch:{{lc:{{{1|}}}}}
 
{{#switch:{{lc:{{{1|}}}}}
   |extended play|ep|[[extended play]]|[[ep]]=[[Extended play|EP]]
+
   |extended play|ep|extended play|ep=EP
   |studio album|[[studio album]]|[[album]]|album|original studio album|lp|studio|cover album|cover|[[cover album]]|[[cover version]]|tribute album|tribute|[[tribute album]]=[[Studio album]]
+
   |studio album|studio album|album|album|original studio album|lp|studio|cover album|cover|cover album|cover version|tribute album|tribute|tribute album=Studio album
   |demo=[[Demo (music)|Demo album]]
+
   |demo=Demo album
   |double album|[[double album]]=[[Studio album]]
+
   |double album|double album=Studio album
   |live album|[[live album]]|live=[[Live album]]
+
   |live album|live album|live=Live album
   |greatest hits|[[greatest hits]]|greatest=[[Greatest hits album]]
+
   |greatest hits|greatest hits|greatest=Greatest hits album
   |box set|[[box set]]|box|[[boxed set]]=[[Box set]]
+
   |box set|box set|box|boxed set=Box set
   |compilation album|compilation|[[compilation album]]=[[Compilation album]]
+
   |compilation album|compilation|compilation album=Compilation album
   |remix album|remix|[[remix]]|[[remix album]]=[[Remix album]]
+
   |remix album|remix|remix|remix album=Remix album
   |mixtape|[[mixtape]]=[[Mixtape]]
+
   |mixtape|mixtape=Mixtape
   |soundtrack|movie soundtrack|[[soundtrack]]|[[soundtrack album]]=[[Soundtrack album]]
+
   |soundtrack|movie soundtrack|soundtrack|soundtrack album=Soundtrack album
   |television|television theme=[[Soundtrack|Television theme]]
+
   |television|television theme=Television theme
   |film|film score|[[film score]]=[[Film score]]
+
   |film|film score|film score=Film score
   |cast recording|[[cast recording]]|cast album|[[cast album]]|cast=[[Cast recording]]
+
   |cast recording|cast recording|cast album|cast album|cast=Cast recording
   |video|dvd=[[Music video|Video]]
+
   |video|dvd=Video
 
   |#default={{{1|}}}
 
   |#default={{{1|}}}
 
}}<noinclude>{{pp-template|small=yes}}
 
}}<noinclude>{{pp-template|small=yes}}
 
{{Documentation}}{{wiki}}</noinclude>
 
{{Documentation}}{{wiki}}</noinclude>

Latest revision as of 07:29, 11 September 2013

[edit] [purge] Documentation icon Template documentation

Important

When modifying this template, don't forget to update Template:Infobox album/color.

Usage

This is an auxiliary template which should be only used by the {{Infobox album}} template. The first parameter should be one of the codes from the table below, representing a type of album. The template returns the wikilinked version of the text.

Quick reference table

CodeLink Display
studioStudio album
Studio album by artist
demoDemo album
Demo album by artist
epEP
EP by artist
liveLive album
Live album by artist
greatestGreatest hits album
Greatest hits album by artist
remixRemix album
Remix album by artist
boxBox set
Box set by artist
compilationCompilation album
Compilation album by artist
mixtapeMixtape
Mixtape by artist
soundtrackSoundtrack album
Soundtrack album by artist
filmFilm score
Film score by artist
castCast recording
Cast recording by artist
videoVideo
Video by artist
otherother
other by artist

Unit test

If at any time the Expected and Obtained columns do not match, this template can be considered broken. This table makes the template automatically check itself. If a Green tickY mark is seen, it means that self test worked fine. if there is a Red XN mark, it means the test failed. Whenever you make a modification to the template, please save the page, hit CTRL+F5, and check if all the self tests have passed. If you add a new type to the template, remember to add the type using this format:

| typename
| typereplace
| {{Infobox album/link|typename}}
| {{#ifeq:{{Infobox album/link|typename}}|typereplace|{{y}}|{{n}}}}

Replace typename with the new type name (in example, Epic soundtrack), and typereplace with the text that will appear as album type (in example, [[Soundtrack|Epic soundtrack]]).

Note: Sometimes the test may pass while previewing the page, but once saved the test would fail, no matter how many times the cache is cleared. In this case, please click this link to purge the cache. If that doesn't solve the problem, please post a note in the Talk page of the template and an editor will review the changes.

Code Expected Obtained Test
Studio album
studio Studio album Studio album Red XN
Studio album Studio album Studio album Red XN
[[Studio album]] Studio album Studio album Green tickY
[[Album]] Studio album Album Red XN
Album Studio album Studio album Red XN
Original studio album Studio album Studio album Red XN
LP Studio album Studio album Red XN
Double album Studio album Studio album Red XN
[[Double album]] Studio album Double album Red XN
Demo album
demo Demo album Demo album Red XN
EP
ep EP EP Red XN
EP EP EP Red XN
Extended play EP EP Red XN
[[EP]] EP EP Red XN
[[Extended play]] EP Extended play Red XN
Live album
live Live album Live album Red XN
Live album Live album Live album Red XN
[[Live album]] Live album Live album Green tickY
Greatest hits
greatest Greatest hits Greatest hits album Red XN
Greatest hits Greatest hits Greatest hits album Red XN
[[Greatest hits]] Greatest hits Greatest hits Green tickY
Remix album
remix Remix album Remix album Red XN
Remix album Remix album Remix album Red XN
[[Remix]] Remix album Remix Red XN
[[Remix album]] Remix album Remix album Green tickY
Box set
box Box set Box set Red XN
Box set Box set Box set Red XN
[[Box set]] Box set Box set Green tickY
[[Boxed set]] Box set Boxed set Red XN
Compilation album
compilation Compilation album Compilation album Red XN
Compilation album Compilation album Compilation album Red XN
[[Compilation album]] Compilation album Compilation album Green tickY
Cover album
cover Cover album Studio album Red XN
Cover album Cover album Studio album Red XN
[[Cover album]] Cover album Cover album Red XN
[[Cover version]] Cover album Cover version Red XN
Tribute album
tribute Tribute album Studio album Red XN
Tribute album Tribute album Studio album Red XN
[[Tribute album]] Tribute album Tribute album Green tickY
Soundtrack
soundtrack Soundtrack Soundtrack album Red XN
Movie soundtrack Soundtrack Soundtrack album Red XN
[[Soundtrack]] Soundtrack Soundtrack Green tickY
[[Soundtrack album]] Soundtrack Soundtrack album Red XN
Television theme
television Television theme Television theme Red XN
Television theme Television theme Television theme Red XN
Film score
film Film score Film score Red XN
Film score Film score Film score Red XN
[[Film score]] Film score Film score Green tickY
Video album
video Video Video Red XN
DVD Video Video Red XN
Other cases
Green tickY
xyz xyz xyz Green tickY


This page contains information from Wikipedia (view authors). It has been modified so that it meets Communpedia's standards. WP
This page contains information from Wikipedia (view authors). It has been modified so that it meets Communpedia's standards. WP