Vorlage:Dmbox: Unterschied zwischen den Versionen

K
37 Versionen von wikivoyage:Vorlage:Dmbox importiert
imported>Davidgothberg
(Making so it reports invalid type parameter by adding itself to Category:Wikipedia message box parameter needs fixing, so we can find and fix such cases.)
K (37 Versionen von wikivoyage:Vorlage:Dmbox importiert)
 
(23 dazwischenliegende Versionen von 13 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="clear: both; margin: 0.9em 1em; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; background: transparent; {{{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 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}}}
   | [[Image:Disambig gray.svg|30px]]
   | [[File:{{#switch:{{{type|}}}
    | setindex = List gray.svg
    | disambig      <!-- disambig = default -->
    | #default = Disambig gray.svg
    }}|30px|alt=Disambiguation icon]]
   }}</td>
   }}</td>
}}
}}
Zeile 24: 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 -->
| disambig
| disambig
| setindex =    <!-- Do nothing, valid "type" -->
| setindex =    <!-- Do nothing, valid "type" -->
| #default = [[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 -->
}}<includeonly>
}}<!--
{{#ifeq:{{NAMESPACE}}|Template||[[Category:All disambiguation pages]]}}
  Magic word for disambiguation pages:
{{#ifeq:{{NAMESPACE}}||[[Category:All article disambiguation pages]]}}</includeonly><noinclude>
-->{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}<!--
 
  Categorization:
{{pp-template|small=yes}}
-->{{#switch:{{{type|}}}
{{documentation}}
| setindex =
  {{category handler
  | main = [[Category:All set index articles]]
  | nocat = {{{nocat|}}}   <!--So "nocat=true" works-->
  | page = {{{page|}}}  <!--For testing-->
  }}
| disambig    <!-- disambig = default -->
| #default =
  {{category handler
  | main = <!-- [[Category:All article disambiguation pages]] -->[[Kategorie:Wegweiser]]<!-- Wegweiser für alle Namensräume -->
  | 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-->
  }}
}}<noinclude>
{{Dokumentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>