This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

Difference between revisions of "Template:Level list entry"

From SuperTux
Jump to: navigation, search
(Created template.)
 
(Introduce hack to remove whitespace from length parameter.)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>!-
+
<includeonly>|-
| {{{Name}}}
+
| {{#if: {{{Screenshot|}}}
| {{{Contributor}}}</includeonly><noinclude>The '''Level list entry''' template inserts information about a level into a level listing.
+
    | [[Image:{{{Screenshot}}}|100px|Screenshot of level {{{Name}}}]]
 +
    | {{#ifexist: Image:{{{Name}}}.png
 +
        | [[Image:{{{Name}}}.png|100px|Screenshot of level {{{Name}}}]]
 +
        | ''Not available''<br /><small>[[Media:{{{Name}}}.png|(Add&nbsp;…)]]</small>
 +
    }}
 +
  }}
 +
| '''{{{Name}}}'''<br /><!--
 +
-->{{#if: {{{Description|}}}
 +
    | {{{Description}}}
 +
    | ''No description available.''
 +
  }}
 +
| {{#if: {{{Difficulty|}}}
 +
    | {{Difficulty | {{{Difficulty}}} }}
 +
    | ''unknown''
 +
  }}
 +
| {{#if: {{{Length|}}}
 +
    | {{Level length | 1={{{Length}}} }} <!-- hack: only strings to named arguments are trimmed (leading and trailing whitespace is removed. -->
 +
    | ''unknown''
 +
  }}
 +
| {{#if: {{{Contributor|}}} | {{{Contributor}}} | [[Team|''SuperTux'' team]] }}</includeonly><noinclude>The '''Level list entry''' template inserts information about a level into a level listing.
  
 
== Usage ==
 
== Usage ==
  
  <nowiki>{{</nowiki>Level list entry | Name=''name_of_level'' | Contributor=''name_of_contributor'' <nowiki>}}</nowiki>
+
  <nowiki>{{</nowiki>Level list entry
 +
  | Name=''name_of_level''
 +
  | Description=''description''
 +
  | Contributor=''name_of_contributor'' &lt;!-- (optional; default: ''SuperTux'' team) --&gt;
 +
  | Screenshot=''screenshot.png''        &lt;!-- (optional; default: ''Name''.png) --&gt;
 +
  | Difficulty=easy|medium|hard      &lt;!-- (optional) --&gt;
 +
  | Length=''n tiles''                  &lt;!-- (optional) --&gt;
 +
<nowiki>}}</nowiki>
  
 
== See also ==
 
== See also ==

Latest revision as of 10:06, 21 March 2010

The Level list entry template inserts information about a level into a level listing.

Usage

{{Level list entry
  | Name=name_of_level
  | Description=description
  | Contributor=name_of_contributor  <!-- (optional; default: SuperTux team) -->
  | Screenshot=screenshot.png        <!-- (optional; default: Name.png) -->
  | Difficulty=easy|medium|hard      <!-- (optional) -->
  | Length=n tiles                   <!-- (optional) -->
}}

See also