Vorlage:Disambiguate: Unterschied zwischen den Versionen

Permanently protected template
ZIM HilfeWiki - das Wiki
imported>Oetterer
 
Zeile 1: Zeile 1:
<!-- This Template automatically creates a disambiuation page for semantic articles. it checks for articles, that have {{PAGENAME}} as set in ''Is disambiguated by''. they will be listet here and an infobox will be displayed where all the data from those pages is merged --><includeonly><!--
+
<!-- This Template automatically creates a disambiuation page for semantic articles. it checks for articles, that have {{PAGENAME}} as set in ''Is disambiguated by''. they will be listet here and an infobox will be displayed where all the data from those pages is merged --><includeonly>{{#invoke:Disambiguate|main}}</includeonly><noinclude>
 
 
  1. check, whether there are pages to disambiguate, and if so get their values for os, service, targetgroup, ... (not! metaservice)
 
 
 
-->{{#arraydefine:disambig_pages|{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|format=list}}|,|unique,sort=asc}}{{#ifexpr: {{#arraysize:disambig_pages}} > 0|<!-- get all the data from the associated pages and put them in array (with unique values) -->{{#arraydefine:disambig_osses|{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|?Is related to os# =|format=list|mainlabel=-}}|,|unique,sort=asc}}{{#arraydefine:disambig_services|{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|?Is associated to service# =|format=list|mainlabel=-}}|,|unique,sort=asc}}{{#arraydefine:disambig_targetgroups|{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|?Is written for target audience# =|format=list|mainlabel=-}}|,|unique,sort=asc}}{{#arraydefine:disambig_types|{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|?Is of type# =|format=list|mainlabel=-}}|,|unique,sort=asc}}{{#vardefine:disambiguate_isdisambiguation|1}}<!--
 
 
 
  2. print the infobox. use merged values from associated pages
 
 
 
-->{{article
 
| os = {{#arrayprint:disambig_osses|,|@@@|{{#ifeq:{{#pos:@@@|IOS}}|0|{{lcfirst:@@@}}|@@@}}}}<!-- print out osses with a workaround for iOS entries-->
 
| service = {{#arrayprint:disambig_services}}
 
| targetgroup = {{#arrayprint:disambig_targetgroups}}
 
| type = {{#arrayprint:disambig_types}}
 
| pagetype = disambiguation page
 
}}<!--
 
  when there is more than one type, infobox article will show an error. however, we will print out our own, just to make sure
 
-->{{#ifeq: {{#arraysize:disambig_types}}|1||{{Template warning|There is more than one type defined on the associated pages. this error has to be corrected on the corresponding page(s)! (passed types are {{#arrayprint:disambig_types}})|Disambiguate}} }}<!-- if there is text in {{{1}}}, print it before the articellisting -->{{#if: {{{1|}}}|{{{1}}}<p></p>}}Das gewählte Thema wird auf den folgenden Seiten behandelt:
 
{{#ask: [[Is disambiguated by::{{BASEPAGENAME}}]]|format=ul|sort=has sortkey|order=ascending}}
 
|<!--
 
 
 
  3. no page to disambiguate: editor feedback
 
 
 
-->{{Template warning|There are no articles that use this page as disambiuation. Nothing to do here!|Disambiguate}}<!-- end of {{#ifexpr: {{#arraysize:disambig_pages}} > 0 ... else -->}}[[Category:Begriffserklärungsseiten für Artikel]]</includeonly><noinclude>
 
  
 
{{documentation}}
 
{{documentation}}
 
<!-- Add categories to the /doc subpage, not here! -->
 
<!-- Add categories to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Aktuelle Version vom 1. März 2023, 09:27 Uhr


Documentation icon Template documentation

Description[Quelltext bearbeiten]

Generates a disambiguation page. Gathers all associated articles automatically, accumulates services, operation systems, targetgroups, and types. Then uses {{article}} and prints an infobox. Also lists all disambiguated pages.

Parameters[Quelltext bearbeiten]

Generates a disambiguation page.

Vorlagenparameter

ParameterBeschreibungTypStatus
Intro text1

Content text (wikitext) displayed on the left of the infobox, right before the disambiguated pages' listing.

Inhaltvorgeschlagen

Usage[Quelltext bearbeiten]

{{disambiguate}}

Variables[Quelltext bearbeiten]

The templates sets these variables to the described values:

disambig_osses
array
accumulated operation systems of associated articles
disambig_pages
array
list of all disambiguated pages
disambig_services
array
accumulated services of associated articles
disambig_targetgroups
array
accumulated targetgroups of associated articles
disambig_types
array
accumulated types of associated articles (should be only one)

See also[Quelltext bearbeiten]

Cookies helfen uns bei der Bereitstellung des ZIM HilfeWikis. Bei der Nutzung vom ZIM HilfeWiki werden die in der Datenschutzerklärung beschriebenen Cookies gespeichert.