Difference between revisions of "Template:Dmbox"

From Self-sufficiency
Jump to: navigation, search
(implement File:List gray.svg as default image for set indices, per talk)
m (25 revisions from wikipedia:Template:Dmbox)
 
(9 intermediate revisions by 6 users not shown)
Line 3: Line 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|}}}
Line 9: Line 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|}}}">
+
}}" style="{{{style|}}}">
 
<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|}}}
Line 28: Line 28:
 
}}
 
}}
 
</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 -->
Line 34: Line 35:
 
| 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|{{
+
  Categorization:
  #switch:{{{type|}}}
+
-->{{#switch:{{{type|}}}
  | setindex =  
+
| setindex =  
    {{main other
+
  {{cat handler
    | [[Category:All set index articles]]
+
  | main = [[Category:All set index articles]]
    | <!-- Do not categorise when not in main (article) space. -->
+
  | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
    }}
+
  | page = {{{page|}}}  <!--For testing-->
   | disambig     <!-- disambig = default -->
+
   }}
  | #default =  
+
| disambig   <!-- disambig = default -->
    {{template other
+
| #default =  
    | <!-- Do not categorise on template pages. -->
+
  {{cat handler
    | [[Category:All disambiguation pages]]
+
  | main = [[Category:All article disambiguation pages]][[Category:All disambiguation pages]]
    }}{{main other
+
  | template =    <!-- Don't categorize on template pages. -->
    | [[Category:All article disambiguation pages]]
+
  | other = [[Category:All disambiguation pages]]
    | <!-- Do not categorise when on non article pages. -->
+
  | nocat = {{{nocat|}}}  <!--So "nocat=true" works-->
    }}
+
  | page = {{{page|}}}  <!--For testing-->
   }} }}}<noinclude>
+
   }}
 +
}}<noinclude>
  
{{pp-template|small=yes}}
+
{{pp-template}}
 
{{documentation}}
 
{{documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Latest revision as of 19:34, 21 September 2010