Vorlage:Liederliste-Stück: Unterschied zwischen den Versionen

Aus Mikiwiki
Wechseln zu: Navigation, Suche
Zeile 20: Zeile 20:
 
| <b>Titel</b> || 2 || Titel des Lieds.
 
| <b>Titel</b> || 2 || Titel des Lieds.
 
|-
 
|-
| <b>Autor</b> || 3 || Der Name des oder der Autoren.
+
| <b>Autor</b> || 3 || Der Name des oder der Autoren. Falls es eine Mikiwiki-Seite zu ihm gibt, wird dahin verlinkt.
 
|-
 
|-
 
| <b>Datum</b> || 4 || Veröffentlichungsdaten.
 
| <b>Datum</b> || 4 || Veröffentlichungsdaten.
Zeile 38: Zeile 38:
 
</tr>
 
</tr>
 
</pre>
 
</pre>
<!-- Gliederungsversuch für Spalte 3
+
<!-- Gliederungsversuch für Spalte 3 (bis 3 Autoren, inzwischen funktioniert es bis 5)
  
 
<td>{{#if: {{{3|}}} |  
 
<td>{{#if: {{{3|}}} |  
Zeile 94: Zeile 94:
 
<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>{{#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>{{#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}} }} | }} {{#if: {{#explode: {{{3|}}}|;|3}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|3}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} {{#if: {{#explode: {{{3|}}}|;|4}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|4}} }} {{#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><small>{{{4|}}}</small></td>
 
<td>{{{5|}}}</td>
 
<td>{{{5|}}}</td>
 
</tr>
 
</tr>
  
 
{{#foreach | array  || expression }}
 
{{#foreach | array  || _v OR 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.
 
 
Magic variables
 
_key                > always contains the text of the key name
 
_value              > always contains the value of the specific array item
 
 
_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
 
 
<td>{{#explode|;|{{{3|}}}| abc }}{{#foreach | abc || {{#ifexist: {{#_value}} | [[{{#_value}}]] | {{#_value}} }} }}</td>
 
<td>{{#explode|;|{{{3|}}}|abc}}{{#foreach |abc|| {{#ifexist: {{#_value}} | [[{{#_value}}]] | {{#_value}} }} }}</td>
 
 
{{#iff: {{{3|}}} | {{#explode |;|{{{3|}}}|autoren}}{{#vardefine:nr | {{#count | autoren }} }}{{#for | {{#a @= 1}} || {{#a <= {{#nr}} }} || {{#a ++}} || Counter: {{#a}} }} | }}
 
 
{{#for | {{#a @= 1}} || {{#a <= {{#count | autoren }} }} || {{#a ++}} || Counter: {{#a}} }}
 
 
<td>{{#if: {{{3|}}} | {{#explode |;|{{{3|}}}|autoren}}{{#foreach | autoren || {{#_value}} }} || }}</td>
 
 
 
-->
 
  
 
{{cat|Vorlage}}
 
{{cat|Vorlage}}
Zeile 130: Zeile 105:
 
<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>{{#if: {{{3|}}} |  
+
<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}} }} | }} {{#if: {{#explode: {{{3|}}}|;|3}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|3}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} {{#if: {{#explode: {{{3|}}}|;|4}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|4}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} | {{{3|}}} }}</td>
{{#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}} }} | }} {{#if: {{#explode: {{{3|}}}|;|3}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|3}} }} {{#ifexist: {{#var:a}} | {{#ifeq: {{#var:a}} | {{PAGENAME}} | {{;}} {{#var:a}} | {{#ifeq: {{#var:a}} | {{#titleparts: {{PAGENAME}} | 1}} | {{;}} {{#var:a}} | {{;}} [[{{#var:a}}]] }} }} | {{;}} {{#var:a}} }} | }} {{#if: {{#explode: {{{3|}}}|;|4}} | {{#vardefine:a | {{#explode:{{{3|}}}|;|4}} }} {{#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><small>{{{4|}}}</small></td>
 
<td>{{{5|}}}</td>
 
<td>{{{5|}}}</td>
 
</tr></includeonly>
 
</tr></includeonly>

Version vom 1. Oktober 2011, 00:59 Uhr

Eine Zeile innerhalb einer Mikiwiki-Liederliste.

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. Falls es eine Mikiwiki-Seite zu ihm gibt, wird dahin verlinkt.
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>