Vorlage:Dmbox: Unterschied zwischen den Versionen

K
37 Versionen von wikivoyage:Vorlage:Dmbox importiert
imported>Davidgothberg
(Updating the category handling by adding {{cat handler}}, so we get automatic category suppression in some places, and so we can use "nocat=true" when needed. No change in what categories used where.)
K (37 Versionen von wikivoyage:Vorlage:Dmbox importiert)
 
(12 dazwischenliegende Versionen von 10 Benutzern werden nicht angezeigt)
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"></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 36: Zeile 35:
| #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 -->
}}<!--  
}}<!--  
  Magic word for disambiguation pages:
-->{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}<!--
   Categorization:
   Categorization:
-->{{#switch:{{{type|}}}
-->{{#switch:{{{type|}}}
| setindex =  
| setindex =  
   {{cat handler
   {{category handler
   | main = [[Category:All set index articles]]
   | main = [[Category:All set index articles]]
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
Zeile 46: Zeile 47:
| disambig    <!-- disambig = default -->
| disambig    <!-- disambig = default -->
| #default =  
| #default =  
   {{cat handler
   {{category handler
   | main = [[Category:All article disambiguation pages]][[Category:All disambiguation pages]]
   | main = <!-- [[Category:All article disambiguation pages]] -->[[Kategorie:Wegweiser]]<!-- Wegweiser für alle Namensräume -->
   | template =    <!-- Don't categorize on template pages. -->
   | template =    <!-- Don't categorize on template pages. -->
   | other = [[Category:All disambiguation pages]]
   | other = [[Kategorie:Wegweiser]]<!-- Wegweiser für alle Namensräume -->
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
   | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
   | page = {{{page|}}}  <!--For testing-->
   | page = {{{page|}}}  <!--For testing-->
   }}
   }}
}}<!--
}}<noinclude>
  Categorize templates that use this meta-template:
{{Dokumentation}}
--><includeonly>{{cat handler
| subpage = no  <!--Don't categorize on /doc, /sandbox, /testcases etc-->
| template = [[Category:Disambiguation message boxes]]
| nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
| page = {{{page|}}}  <!--For testing-->
}}</includeonly><noinclude>
 
{{pp-template}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>