Difference between revisions of "Template:Death by"

From Disobiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!-- the lack of whitespace, and the nowiki tags, are to workaround crazy display bugs involving lack of, or too many, whitespaces in the output. this, of course, makes it nearly impossible to understand or edit without re-formatting it in a text-editor. --><nowiki></nowiki>{{#ifeq: {{NAMESPACE}} | File | [[Category:All images of death by]] | }}{{#if: {{{1|}}} | [[Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{1}}} | Death by {{{1}}}}}]]{{#ifeq: {{{display|1}}} | 1 | {{#ifeq: {{{lower|0}}} | 0 | [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{1}}} | Death by {{{1}}}}}|{{#ifeq: {{{prefix|0}}} | 1 | Death by | }}{{{1}}}]] | [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{1}}} | Death by {{{1}}}}}|{{#ifeq: {{{prefix|0}}} | 1 | death by | }}{{{1}}}]]}}}}}}{{#if: {{{2|}}} | [[Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{2}}} | Death by {{{2}}}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{2}}} | Death by {{{2}}}}}|{{{2}}}]]}}}}{{#if: {{{3|}}} | [[Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{3}}} | Death by {{{3}}}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{3}}} | Death by {{{3}}}}}|{{{3}}}]]}}}}{{#if: {{{4|}}} | [[Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{4}}} | Death by {{{4}}}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{4}}} | Death by {{{4}}}}}|{{{4}}}]]}}}}{{#if: {{{5|}}} | [[Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{5}}} | Death by {{{5}}}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category: {{#ifeq: {{NAMESPACE}} | File | Images of death by {{{5}}} | Death by {{{5}}}}}|{{{5}}}]]}}}}</includeonly><noinclude>
+
<includeonly><!-- The lack of whitespace, and the nowiki tags, are to workaround crazy display bugs involving lack of, or too many, whitespaces in the output. This, of course, makes it nearly impossible to understand or edit without re-formatting it in a text-editor. --><nowiki></nowiki>{{#ifeq: {{NAMESPACE}} | File | [[Category:Death by]] | }}{{#if: {{{1|}}} | [[Category:Death by {{{1}}}]]{{#ifeq: {{{display|1}}} | 1 | {{#ifeq: {{{lower|0}}} | 0 | [[:Category:Death by {{{1}}}|{{#ifeq: {{{prefix|0}}} | 1 | Death by | }} {{{1}}}]] | [[:Category:Death by {{{1}}}|{{#ifeq: {{{prefix|0}}} | 1 | death by | }}{{{1}}}]]}}}}}}{{#if: {{{2|}}} | [[Category:Death by {{{2}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category:Death by {{{2}}}|{{{2}}}]]}}}}{{#if: {{{3|}}} | [[Category:Death by {{{3}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category:Death by {{{3}}}|{{{3}}}]]}}}}{{#if: {{{4|}}} | [[Category:Death by {{{4}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category:Death by {{{4}}}|{{{4}}}]]}}}}{{#if: {{{5|}}} | [[Category:Death by {{{5}}}]]{{#ifeq: {{{display|1}}} | 1 | , [[:Category:Death by {{{5}}}|{{{5}}}]]}}}}</includeonly><noinclude>
 
This template handles categorization of a single death with up to five categories.
 
This template handles categorization of a single death with up to five categories.
<br />It is namespace aware, categorizing deaths into image categories as necessary.
+
<br />For further discussion about death by category and usage, see [[Death and sleaze guidelines|the guidelines]].
<br />For further discussion about death by category and usage, see [[Video Underbelly guidelines|the guidelines]].
 
  
 
==Usage==
 
==Usage==
Line 28: Line 27:
 
| '''display'''
 
| '''display'''
 
| Optional; whether to display any text at all (ie., categorization only).
 
| Optional; whether to display any text at all (ie., categorization only).
 +
|-
 +
| '''prefix'''
 +
| Optional; whether to preface the categories with "Death by".
 
|}
 
|}
  
Line 36: Line 38:
 
! style="text-align: left" | to get this:
 
! style="text-align: left" | to get this:
 
|-  
 
|-  
| <code><nowiki>{{Death by|axe}}</nowiki></code>
+
| <code><nowiki>{{Death by|axe|}}</nowiki></code>
 +
| [[:Category: Death by axe|axe]]
 +
|-
 +
| <code><nowiki>{{Death by|axe|prefix=1}}</nowiki></code>
 
| [[:Category: Death by axe|Death by axe]]
 
| [[:Category: Death by axe|Death by axe]]
 
|-  
 
|-  
| <code><nowiki>{{Death by|vampire|mutant|lower=1}}</nowiki></code>
+
| <code><nowiki>{{Death by|vampire|spear|prefix=1|lower=1}}</nowiki></code>
| [[:Category: Death by vampire|death by vampire]], [[:Category: Death by mutant|mutant]]
+
| [[:Category: Death by vampire|death by vampire]], [[:Category: Death by spear|spear]]
 
|-  
 
|-  
 
| <code><nowiki>{{Death by mutant|mutilation|decapitation|display=0}}</nowiki></code>
 
| <code><nowiki>{{Death by mutant|mutilation|decapitation|display=0}}</nowiki></code>

Latest revision as of 10:04, 3 July 2014

This template handles categorization of a single death with up to five categories.
For further discussion about death by category and usage, see the guidelines.

Usage

{{Death by|axe}}
{{Death by|vampire|midget|lower=1}}
{{Death by|mutant|mutilation|decapitation|display=0}}

Parameters

Note: * denotes required fields.

Parameter Explanation
1 to 5 * Insert one to five categories describing this death; only one is required.
lower Optional; whether to show "death by mutant" instead of "Death by mutant".
display Optional; whether to display any text at all (ie., categorization only).
prefix Optional; whether to preface the categories with "Death by".

Examples

Type the following... to get this:
{{Death by|axe|}} axe
{{Death by|axe|prefix=1}} Death by axe
{{Death by|vampire|spear|prefix=1|lower=1}} death by vampire, spear
{{Death by mutant|mutilation|decapitation|display=0}} No output because display is disabled.