Template:Series

From FORwiki

(Difference between revisions)
Jump to: navigation, search
 
Line 8: Line 8:
-->{{{7|}}}{{#if:{{{9|}}}  |,&nbsp; |{{#if:{{{8|}}}|&nbsp;{{{type}}}&nbsp;}}}}<!--
-->{{{7|}}}{{#if:{{{9|}}}  |,&nbsp; |{{#if:{{{8|}}}|&nbsp;{{{type}}}&nbsp;}}}}<!--
-->{{{8|}}}{{#if:{{{10|}}} |,&nbsp; |{{#if:{{{9|}}}|&nbsp;{{{type}}}&nbsp;}}}}<!--
-->{{{8|}}}{{#if:{{{10|}}} |,&nbsp; |{{#if:{{{9|}}}|&nbsp;{{{type}}}&nbsp;}}}}<!--
-
-->{{{9|}}}{{#if:{{{10|}}} |&nbsp;{{{type}}}&nbsp;}}{{{10|}}}
+
-->{{{9|}}}{{#if:{{{10|}}} |&nbsp;{{{type}}}&nbsp;}}{{{10|}}}<noinclude>
-
<noinclude>
+
{{documentation}}
{{documentation}}
[[Category:Templates]]
[[Category:Templates]]
[[Category:Visual Templates]]
[[Category:Visual Templates]]
</noinclude>
</noinclude>

Current revision as of 02:51, 14 January 2010

[edit] [purge] Template documentation

Usage

This template produces a comma-separated list of zero to ten items.

{{series
|type=or or |type=and  (to specify whether "or" or "and" appears before last item in list)
|item1|item2|item3 ... |item10}}

Examples

Is your favorite color red{{series |type=or|blue|yellow|green}}?
Is your favorite color red, blue, yellow or green?

My favorite colors are red{{series |type=and|blue}}.
My favorite colors are red and blue.

Is your favorite color red{{series |type=irrelevant}}?
Is your favorite color red?

The primary intent is for this template to be passed conditional parameters in a form similar to:
{{series |type=and|{{{first|}}}|{{{second|}}}|{{{third|}}}...|{{{tenth|}}}}}

If some of these passed parameters are blank then the series template will ignore them. This can allow other templates to generate comma separated lists of variable length.

Personal tools