Template:Default

From PCSAR

Revision as of 14:24, 8 February 2012 by Brett Wuth (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This is the documentation for the template Template:Default

Template:Default/Doc:

[edit] Description

This template returns the first argument which is not blank, or nothing if they all are blank.

[edit] Usage

  {{default|arg1|arg2|arg3|arg4|arg5}}

All arguments are optional

[edit] Examples

Test cases:

You type... You get...
{{default}}        
{{default|}}        
{{default|arg1}}        
arg1
{{default||}}        
{{default||arg2}}        
arg2
{{default|arg1|}}        
arg1
{{default|arg1|arg2}}        
arg1
{{default|||}}        
{{default|||arg3}}        
arg3
{{default||arg2|}}        
arg2
{{default||arg2|arg3}}        
arg2
{{default|arg1||}}        
arg1
{{default|arg1||arg3}}        
arg1
{{default|arg1|arg2|}}        
arg1
{{default|arg1|arg2|arg3}}        
arg1
{{default||||}}        
{{default||||arg4}}        
arg4
{{default|||arg3|}}        
arg3
{{default|||arg3|arg4}}        
arg3
{{default||arg2||}}        
arg2
{{default||arg2||arg4}}        
arg2
{{default||arg2|arg3|}}        
arg2
{{default||arg2|arg3|arg4}}        
arg2
{{default|arg1|||}}        
arg1
{{default|arg1|||arg4}}        
arg1
{{default|arg1||arg3|}}        
arg1
{{default|arg1||arg3|arg4}}        
arg1
{{default|arg1|arg2||}}        
arg1
{{default|arg1|arg2||arg4}}        
arg1
{{default|arg1|arg2|arg3|}}        
arg1
{{default|arg1|arg2|arg3|arg4}}        
arg1
{{default|||||}}        
{{default|||||arg5}}        
arg5
{{default||||arg4|}}        
arg4
{{default||||arg4|arg5}}        
arg4
{{default|||arg3||}}        
arg3
{{default|||arg3||arg5}}        
arg3
{{default|||arg3|arg4|}}        
arg3
{{default|||arg3|arg4|arg5}}        
arg3
{{default||arg2|||}}        
arg2
{{default||arg2|||arg5}}        
arg2
{{default||arg2||arg4|}}        
arg2
{{default||arg2||arg4|arg5}}        
arg2
{{default||arg2|arg3||}}        
arg2
{{default||arg2|arg3||arg5}}        
arg2
{{default||arg2|arg3|arg4|}}        
arg2
{{default||arg2|arg3|arg4|arg5}}        
arg2
{{default|arg1||||}}        
arg1
{{default|arg1||||arg5}}        
arg1
{{default|arg1|||arg4|}}        
arg1
{{default|arg1|||arg4|arg5}}        
arg1
{{default|arg1||arg3||}}        
arg1
{{default|arg1||arg3||arg5}}        
arg1
{{default|arg1||arg3|arg4|}}        
arg1
{{default|arg1||arg3|arg4|arg5}}        
arg1
{{default|arg1|arg2|||}}        
arg1
{{default|arg1|arg2|||arg5}}        
arg1
{{default|arg1|arg2||arg4|}}        
arg1
{{default|arg1|arg2||arg4|arg5}}        
arg1
{{default|arg1|arg2|arg3||}}        
arg1
{{default|arg1|arg2|arg3||arg5}}        
arg1
{{default|arg1|arg2|arg3|arg4|}}        
arg1
{{default|arg1|arg2|arg3|arg4|arg5}}        
arg1
{{default|arg1|arg2|arg3|arg4|arg5|arg6}}        
Template:Default should have at most 5 argumentsarg1


To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools