Vorlage:Dmbox: Unterschied zwischen den Versionen

K
37 Versionen von wikivoyage:Vorlage:Dmbox importiert
(Autocategorize disambig message box templates, per proposal)
K (37 Versionen von wikivoyage:Vorlage:Dmbox importiert)
 
(16 dazwischenliegende Versionen von 12 Benutzern werden nicht angezeigt)
Zeile 3: Zeile 3:
| setindex = setindexbox
| setindex = setindexbox
| disambig      <!-- disambig = default -->
| disambig      <!-- disambig = default -->
| #default = disambig
| #default = disambigbox
}}" class="metadata plainlinks dmbox  
}}" class="metadata plainlinks dmbox  
{{#switch:{{{type|}}}
{{#switch:{{{type|}}}
Zeile 9: Zeile 9:
| disambig      <!-- disambig = default -->
| disambig      <!-- disambig = default -->
| #default = dmbox-disambig
| #default = dmbox-disambig
}}" style="{{{style|}}}">
}} {{{class|}}}" style="{{{style|}}}" role="presentation">
<tr>
<tr>
{{#ifeq:{{{image|}}}|none
{{#ifeq:{{{image|}}}|none
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell" style="border: none; padding: 0px; width: 1px;"></td>
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
| <td class="mbox-image" style="padding: 2px 0 2px 0.4em;">
| <td class="mbox-image" style="padding: 2px 0 2px 0.4em;"> {{#if:{{{image|}}}
  {{#if:{{{image|}}}
   | {{{image}}}
   | {{{image}}}
   | {{#switch:{{{type|}}}
   | [[File:{{#switch:{{{type|}}}
     | setindex = [[Image:List gray.svg|30px]]
     | setindex = List gray.svg
     | disambig      <!-- disambig = default -->
     | disambig      <!-- disambig = default -->
     | #default = [[Image:Disambig gray.svg|30px]]
     | #default = Disambig gray.svg
    }}
    }}|30px|alt=Disambiguation icon]]
   }}</td>
   }}</td>
}}
}}
Zeile 28: Zeile 27:
}}
}}
</tr>
</tr>
</table><!-- Detect and report usage with faulty "type" parameter:
</table><!--  
  Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
-->{{#switch:{{{type|}}}
|  <!-- No type fed, is also valid input -->
|  <!-- No type fed, is also valid input -->
Zeile 34: Zeile 34:
| setindex =    <!-- Do nothing, valid "type" -->
| setindex =    <!-- Do nothing, valid "type" -->
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!-- Categorisation:
}}<!--  
-->{{{category|{{
  Magic word for disambiguation pages:
   #switch:{{{type|}}}
-->{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}<!--
  | setindex =  
   Categorization:
    {{main other
-->{{#switch:{{{type|}}}
    | [[Category:All set index articles]]
| setindex =  
    | <!-- Do not categorise when not in main (article) space. -->
  {{category handler
    }}
  | main = [[Category:All set index articles]]
   | disambig     <!-- disambig = default -->
  | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
  | #default =  
  | page = {{{page|}}}   <!--For testing-->
    {{template other
   }}
    | <!-- Do not categorise on template pages. -->
| disambig   <!-- disambig = default -->
    | [[Category:All disambiguation pages]]
| #default =  
    }}{{main other
  {{category handler
    | [[Category:All article disambiguation pages]]
  | main = <!-- [[Category:All article disambiguation pages]] -->[[Kategorie:Wegweiser]]<!-- Wegweiser für alle Namensräume -->
    | <!-- Do not categorise when on non article pages. -->
  | template =    <!-- Don't categorize on template pages. -->
    }}
   | other = [[Kategorie:Wegweiser]]<!-- Wegweiser für alle Namensräume -->
   }} }}}<!--
  | nocat = {{{nocat|}}}   <!--So "nocat=true" works-->
 
  | page = {{{page|}}}   <!--For testing-->
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:Disambiguation message boxes|{{PAGENAME}}]]}}}}</includeonly><!--
  }}
 
}}<noinclude>
--><noinclude>
{{Dokumentation}}
 
{{pp-template|small=yes}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>