Difference between revisions of "Template:Infobox terminal/check graphic type"

From Terminals
Jump to: navigation, search
(create page)
 
m (expands to 1 if argument is unspecified, or is a valid graphic type)
 
Line 2: Line 2:
 
== Template ==
 
== Template ==
 
</noinclude><includeonly>{{#if:{{{1|}}}<!--
 
</noinclude><includeonly>{{#if:{{{1|}}}<!--
-->|{{#switch:{{lc:{{{1}}}}}<!--
+
-->|{{#if:{{infobox terminal/canonical graphic type|{{{1}}}}}<!--
   -->|monochrome=Monochrome<!--
+
   -->|1<!--
  -->|staticgray=StaticGray<!--
+
   -->|<!--
  -->|grayscale=GrayScale<!--
 
  -->|pseudocolor=PseudoColor<!--
 
  -->|directcolor=DirectColor<!--
 
  -->|truecolor=TrueColor<!--
 
   -->|#default=<!--
 
 
   -->}}<!--
 
   -->}}<!--
 +
-->|1<!--
 
-->}}</includeonly><noinclude>
 
-->}}</includeonly><noinclude>
  
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 06:07, 23 August 2012

Template

[edit] [history] [purge] Documentation icon Template documentation

This template validates the single positional argument as a valid graphic type name: Monochrome, StaticGray, GrayScale, PseudoColor, DirectColor or TrueColor. If the argument is valid or empty, the template expands to 1. If the argument is non-empty and isn't a valid graphic type, the template expands to empty.