Vorlage:Gather information: Unterschied zwischen den Versionen

CamNet - das Wiki
(Die Seite wurde neu angelegt: „<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><!-- this gathers all information about {…“)
 
KKeine Bearbeitungszusammenfassung
 
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><!-- this gathers all information about {{PAGENAME}}, mentions in texts and infos added in chapter. it only displays something, if any query was successful. returns empty string, if nothing was found.
<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><!--  
 
this gathers all information about {{PAGENAME}}, mentions in texts and infos added in chapter. it only displays something, if any query was successful. returns empty string, if nothing was found.


first, lets check for mentions in texts
first, lets check for mentions in texts
-->{{#vardefine:mentions|{{#ask: [[Kategorie:Texte]] [[concerns::{{FULLPAGENAME}}]] | ?has source=Quelle: | ?has short description=Beschreibung: | mainlabel=Erwähnt in | headers=plain | sort=has display title | order=asc | format=ul | intro=<h2>Textuelle Erwähnungen</h2>}}}}<!--  
-->{{#vardefine:mentions|{{#ask: [[Kategorie:Texte]] [[concerns::{{FULLPAGENAME}}]] | ?has source=Quelle: | ?has short description=Beschreibung: | mainlabel=Erwähnt in | headers=plain | sort=has display title | order=asc | format=ul | intro=<h2>Textuelle Erwähnungen</h2>}}}}<!--  


OLD: Here we segragated by "is about"; currently, not workin properly. So we forgo the into types and list all of them at one
now get all the types of infos:
now get all the types of infos:
-->{{#arraydefine:types|{{#var:types|}}{{#ask: [[Attribut:Is about]] | ?allows value= | format = list | mainlabel=-|headers=none}}|,}}<!--  
-- >{{#arraydefine:types|{{#var:types|}}{{#ask: [[Attribut:Is about]] | ?allows value= | format = list | mainlabel=-|headers=none}}|,}}<!--  


and with all the types at hand, get all the differnt info types, one at a time:
and with all the types at hand, get all the differnt info types, one at a time:
-->{{#vardefine:infos|}}{{#vardefine:infos|{{#var:infos|}}{{#arrayprint:types||@@@@|{{#ask:[[Is_member_of_class::Info]] [[concerns::{{FULLPAGENAME}}]] [[is about::@@@@]] | ?holds information= | ?has source=Quelle: | ?Is_associated_to_page=siehe auch: | | mainlabel=- | headers=plain | format=ul | intro=<h3>@@@@</h3>}}}}}} <!--  
-- >{{#vardefine:infos|}}{{#vardefine:infos|{{#var:infos|}}{{#arrayprint:types||@@@@|{{#ask:[[Is_member_of_class::Info]] [[concerns::{{FULLPAGENAME}}]] [[is about::@@@@]] | ?holds information= | ?has source=Quelle: | ?Is_associated_to_page=siehe auch: | mainlabel=- | headers=plain | format=ul | intro=<h3>@@@@</h3>}}}}}} <!--
 
here we gather all the mentions, no caring about "is about"
-->{{#vardefine:infos|{{#ask:[[Is_member_of_class::Info]] [[concerns::{{FULLPAGENAME}}]] | ?holds information= | ?has source=Quelle: | ?is about=Typ | ?Is_associated_to_page=siehe auch: | mainlabel=- | headers=plain | format=ul}}}}<!--


add a headline to infos, if not empty
add a headline to infos, if not empty
-->{{#if:{{#var:infos|}}{{#vardefine:infos|<h2>Vorhandene Informationen</h2>{{#var:infos|}}}}<!--  
-->{{#if:{{#var:infos|}}|{{#vardefine:infos|<h2>Vorhandene Informationen</h2>{{#var:infos|}}}}}}<!--  


finally, produce "output"  
finally, produce "output"  

Aktuelle Version vom 15. Mai 2022, 21:29 Uhr

{{#vardefine:mentions|}}{{#vardefine:infos|}}{{#vardefine:infos|

Vorhandene Informationen

{{#var:infos|}}}}{{#var:mentions|}}{{#var:infos|}}

Documentation icon Template documentation

Description

This gathers all information about {{PAGENAME}}, mentions in {{text}}s and {{info}}s added in {{chapter}}s. It only displays something, if any query was successful. Returns empty string, if nothing was found.

Parameters

none

Usage

{{Gather information}}

See also