Vorlage:Liederliste-Stück: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Michi (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Michi (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 101: | Zeile 101: | ||
{{#foreach | array || expression }} | {{#foreach | array || expression }} | ||
{{#foreach | array || value var name ||expression }} | {{#foreach | array || _v OR value var name ||expression }} | ||
{{#foreach | array || key var name || value var name ||expression }} | {{#foreach | array || _k OR key var name || _v OR value var name ||expression }} | ||
The expression will be evaluated for each value contained within the array. During each iteration certain "magic variables" will be set. The names of those variables depend on if value var name and key var name are set. | The expression will be evaluated for each value contained within the array. During each iteration certain "magic variables" will be set. The names of those variables depend on if value var name and key var name are set. | ||
Zeile 109: | Zeile 109: | ||
_key > always contains the text of the key name | _key > always contains the text of the key name | ||
_value > always contains the value of the specific array item | _value > always contains the value of the specific array item | ||
_k OR key var name > contains the text of the key name | _k OR key var name > contains the text of the key name | ||
_v OR value var name > contains the value of the specific array item | _v OR value var name > contains the value of the specific array item | ||
Zeile 116: | Zeile 117: | ||
<td>{{#explode|;|{{{3|}}}| abc }}{{#foreach | abc || {{#var | x }}{{#ifexist: {{#var:x}} | [[{{#var:x}}]] | {{#var:x}} }} }}</td> | <td>{{#explode|;|{{{3|}}}| abc }}{{#foreach | abc || {{#var | x }}{{#ifexist: {{#var:x}} | [[{{#var:x}}]] | {{#var:x}} }} }}</td> | ||
--> | --> | ||
Zeile 124: | Zeile 124: | ||
<td>{{{1|}}}</td> | <td>{{{1|}}}</td> | ||
<td><b>{{#ifexist: Lied "{{{2|}}}" ({{{3|}}}) | [[Lied "{{{2|}}}" ({{{3|}}}) | {{{2|}}}]] | {{{2|}}} }}</b></td> | <td><b>{{#ifexist: Lied "{{{2|}}}" ({{{3|}}}) | [[Lied "{{{2|}}}" ({{{3|}}}) | {{{2|}}}]] | {{{2|}}} }}</b></td> | ||
<td>{{#explode|;|{{{3|}}}| abc }}{{#foreach | abc || {{#var:_value}} }}</td> | <td>{{#explode|;|{{{3|}}}| abc }}{{#foreach | abc || {{#var|_value}} || {{#var:_value}} }}</td> | ||
<td><small>{{{4|}}}</small></td> | <td><small>{{{4|}}}</small></td> | ||
<td>{{{5|}}}</td> | <td>{{{5|}}}</td> | ||
</tr></includeonly> | </tr></includeonly> |
Version vom 30. September 2011, 11:57 Uhr
Eine Zeile innerhalb einer Mikiwiki-Liederliste.
- Die Vorlage:Liederliste-Kopf erzeugt die Kopfzeile mit den Spaltenbezeichnungen.
- Die Vorlage:Fuss schliesst die Tabelle ab.
Kopiervorlage
{{Liederliste-Stück||||| }}
Beschreibung
Spalte | Para- meter |
Inhalt |
---|---|---|
Dauer | 1 | Dauer des Lieds. |
Titel | 2 | Titel des Lieds. |
Autor | 3 | Der Name des oder der Autoren. |
Datum | 4 | Veröffentlichungsdaten. |
Anmerkungen | 5 | Anmerkungen. |
Wiki-Syntax
<tr> <td>{{{1|}}}</td> <td><b>{{#ifexist: Lied "{{{2|}}}" ({{{3|}}}) | [[Lied "{{{2|}}}" ({{{3|}}}) | {{{2|}}}]] | {{{2|}}} }}</b></td> <td>{{#if: {{{3|}}} | {{#if: {{#explode: {{{3|}}}|;|0}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|0}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{#var:a}} | [[{{#var:a}}]] }} }} | {{#var:a}} }} | }} {{#if: {{#explode: {{{3|}}}|;|1}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|1}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} {{#if: {{#explode: {{{3|}}}|;|2}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|2}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} | {{{3|}}} }}</td> <td><small>{{{4|}}}</small></td> <td>{{{5|}}}</td> </tr>