Template:Pf-switch/doc

This template is meant for users who are just learning about the Parser Functions Extension. If you are experienced in using the extended parser function, please refreain from using this template as it allows only six cases to be tested in the  function.

How-To Guide
The  parser function takes an input value and sees whether said value matches any of the inputted test values. If a match is found, the function replies by outputting inputted result text. If no match is found, then the function replies by outputting an inputted default text. Here is the layout for pf-switch:

input value

Parameters

 * t: T is the input value. It is usually a parameter of another template that is transcluding pf-switch.
 * test value: Test values are the various values that the function will attempt to test t against. If t matches a test value, then the function will output the corresponding result.
 * result: Results are the output values that will be putputted if t matches their corresponding test value. Each pair of test and result values are linked by their number: test value 1 corresponds to result 2, test value 4 corresponds to result 4, and so on.
 * d: D is the default value. If t does not match any of the test values, then this is the value to be outputted.

Example
This:

Becomes this: