|
|
(43 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| <!-- Get the recordset in array format | | <noinclude>Diese Vorlage wird in den Chronikseiten verwendet, um Gebäude Baujahr und Abbruchjahr zu automatisieren.</noinclude><!-- |
| -->{{#vardefine:recordset|{{#ask:[[{{PAGENAME}}::+]]
| | --><includeonly>{{Chronikeintrag|Gebäude}} |
| |?{{PAGENAME}}
| | {{#ask:[[:+]] [[Baujahr::{{PAGENAME}}]] |
| |?Gebäude
| | |?Pronomen |
| | format=array
| | |?Objekt |
| | sep=<RESULT>
| | |?Architekt |
| | mainlabel=-
| | |template=Baujahr |
| }}}}<!-- Get article from which this result came
| | |format=ul}}<!-- |
| -->{{#vardefine:article|{{#explode:{{#var:recordset}}|<PROP>|-1}} }}<!--
| | -->{{#ask:[[:+]] [[Abbruchjahr::{{PAGENAME}}]] |
| -->{{#vardefine:records|{{#replace:{{#var:recordset}}|<PROP>{{#var:article}}|}} }}<!-- | | |?Pronomen |
| -->* {{#replace:{{#var:records}}|<MANY>| (siehe [[{{#var:article}}]]). <li> }} (siehe [[{{#var:article}}]]).
| | |?Objekt |
| ----
| | |?Architekt |
| {{#var:recordset}}
| | |template=Abbruchjahr |
| ----
| | |format=ul}}</includeonly> |
| {{#vardefine: start | {{#explode: {{#var: recordset}} | <PROP> | 0}} }}
| |
| * Good thing: {{#var: start}}
| |
| {{#vardefine: end | {{#replace: {{#var: recordset}} | {{#var: start}} }} }}
| |
| * Just the rest of the fest: {{#var: end}}
| |
| {{#vardefine: property | {{#replace: {{#explode: {{#var: end}} | <RESULT> | 0}} | <PROP> | }} }}
| |
| * This is the extracted property: {{#var: property}}
| |
| {{#vardefine: element | {{#explode: {{#var: start}} | <MANY> | 0}} }}
| |
| * An element: {{#var: element}}
| |
| ---- | |
| ALL OF THE ELEMENTS:
| |
| <ul>
| |
| {{#while: | |
| | {{#ifexpr: {{#pos: {{#var: start}} | <MANY>}} | true }}
| |
| |
| |
| {{#vardefine: element | {{#explode: {{#var: start}} | <MANY> | 0}} }}
| |
| {{#vardefine: start | {{#replace: {{#var: start}} | {{#var: element}}<MANY> | }} }}
| |
| <li> {{#var: element}} Siehe Artikel [[{{#var: property}}]].}}
| |
| <li> {{#var: start}} Siehe Artikel [[{{#var: property}}]].</ul>
| |
| ----
| |
| {{#vardefine: end | {{#replace: {{#var: end}} | {{#explode: {{#var: end}} | <RESULT> | 0}}<RESULT> | }} }}
| |
| * Removed the prop from end: {{#var: end}}
| |