Vorlage:Service: Unterschied zwischen den Versionen

Permanently protected template
ZIM HilfeWiki - das Wiki
 
 
(5 dazwischenliegende Versionen von 2 Benutzern 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 --><includeonly>{{#if:{{{1|}}}|[[shows on service landing page::{{{1}}}]]}}{{#ifeq:{{NAMESPACENUMBER}}|3500|{{#if:{{{1|}}}|{{#if:{{{2|}}}||[[Category:Services]]}}|[[Category:Servicepages with erroneous input]]}}}}<!--Last line of your template code--></includeonly><noinclude>
+
<!-- Start your template code here. for tipps and tools for template development, please refer to our help-section --><includeonly><!--
 +
this template behaves differenty for pages in ns "Service" than those pages, transcluding them. So start a switch case for namespace ids
 +
1st start with the things shown on pages transcluding the page with this template (PAGE -> PageWithTemplateServer -> Template:Service)
 +
-->{{#switch: {{NAMESPACENUMBER}}
 +
| 3500 =<!-- this is meta namespace. action here should help finding pages where the migration ns meta -> ns service is not done yet
 +
-->[[Category:Inactive services]]{{ambox|type=speedy|text=Diese Seite ist veraltet. Bitte stellen Sie sicher, dass eine Seite mit gleichem Namen im Namensraum ''Service'' existiert und löschen Sie diese Seite!}}
 +
| 3608 =<!-- this is ns service.
 +
  * link this service to (a) portal page(s) via smw property (or put it in a gardening category
 +
-->{{#if:{{{portal|}}}|<!--
 +
  ** we have data for parameter "portal". link it via smw:
 +
-->This service links to service portal page(s): {{#arraymap:{{{portal}}}|,|@@@@|[[shows on service landing page::@@@@]]|,<nowiki> </nowiki>}}<!--
 +
  ** parameter "portal" missing or emtpy
 +
-->|{{errortext|Bitte eine oder mehrere Serviceportalseiten angeben, auf denen Artikel für diesen Service angezeigt werden!}}[[Category:Servicepages with erroneous input]]}}<!--
 +
  * set display name to {{{displayname}}} oif set, to page name otherwise
 +
-->{{#set:has display title={{#if:{{{displayname|}}}|{{{displayname}}}|{{PAGENAME}}}}}}{{DISPLAYTITLE:{{#if:{{{displayname|}}}|{{{displayname}}}|{{PAGENAME}}}}}}<!--
 +
  * and now categorize the service
 +
-->{{#ifeq:{{{active|Nein}}}|Ja|[[Category:Services]]|[[Category:Inactive services]]}}
 +
|<!-- the default, so all other pages
 +
  * the serive page will be transcluded by articles. So pass comma separated list to calling article template
 +
-->{{#if:{{{portal|}}}|{{#arraymap:{{{portal}}}|,|@@@@|[[{{unlink string|@@@@}}]]|,}}<!--
 +
** no portal parameter, show textual warning
 +
-->|<!-- let template article handle this-->}}<!--
 +
* if this service is inactive, put articles, including it in a special gardening category
 +
-->{{#ifeq:{{{active|Nein}}}|Ja||[[Category:Articles linking to inactive services]]}}<!--
 +
end of switch -->}}<!--Last line of your template code--></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 13. April 2023, 06:57 Uhr

Documentation icon Template documentation

Description[Quelltext bearbeiten]

Links a technical service (PAGENAME) to one or many service landing page(s) (parameter portal). Page will also be categorized in Category:Services or Category:Inactive services, depending on parameter active.

When in another namespace than 3608 (Service), returns the associated service portal pages as comma separated list.

Special: When in 3500 (Meta) sets category Category:Inactive services and displays an error.

Parameters[Quelltext bearbeiten]

Links a technical service (PAGENAME) to a service landing page.

Vorlagenparameter

ParameterBeschreibungTypStatus
Serviceportalportal

Depicts the service landing page, articles belonging to that technical service are listed on

Seiteerforderlich
Aktivactive

Activates or deactivates the service.

Booleschoptional
Anzeigenamedisplayname

Sets the name for this service used in the drop down on article forms.

Zeileoptional

Usage[Quelltext bearbeiten]

{{service
|portal=PAGE
|active=Ja
}}

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.