Vorlage:Category handler: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
imported>Davidgothberg
(Adding support for "category=empty/no/not defined/¬/yes" for backwards compatibility, to ease deployment. Unfortunately bloating the code.)
imported>Davidgothberg
(More efficient code for the "category" parameter. No change in functionality.)
Zeile 4: Zeile 4:
   }}{{#ifeq: {{lc: {{{categories|}}} }} | no
   }}{{#ifeq: {{lc: {{{categories|}}} }} | no
   | dontcat  <!--"categories=no", don't categorize-->
   | dontcat  <!--"categories=no", don't categorize-->
   }}{{#ifeq: {{{category|¬}}} | ¬
   }}{{#switch: {{lc: {{{category|¬}}} }}
   |   <!--"category = ¬" or "category" not defined-->
   | no            <!--"category = no"-->
   | {{#if: {{{category|}}}
   |   = dontcat  <!--"category =", defined but empty-->
    | {{#ifeq: {{lc: {{{category|}}} }} | no
  }}  <!--Else "category = ¬" or not defined or "yes" or other data-->
      | dontcat
 
      |   <!--"category = yes" or has other data-->
      }}
    | dontcat   <!--"category" is defined but empty-->
    }}
  }}
|  <!--Don't categorise (result was "dontcat" or "dontcatdontcat" and so on)-->
|  <!--Don't categorise (result was "dontcat" or "dontcatdontcat" and so on)-->
| <!--If "data" is a number, return the corresponding  
| <!--If "data" is a number, return the corresponding  

Version vom 20. November 2009, 22:57 Uhr

Vorlage:Cat handler/numbered

Template-info.png Dokumentation für die Vorlage {{Category handler}}[Ansicht] [Bearbeiten] [Versionsgeschichte] [Aktualisieren]
Für die Vorlage {{Category handler}} gibt es noch keine Dokumentation. Du kannst sie aber anlegen.
Hinweise