mpfserver Manual
mpfserver
Token structure
Variables
Directives
mpf:eval
mpf:exec
mpf:function
mpf:ignore
mpf:loop
mpf:noparse
mpf:switch
Examples
mpf:redirect
mpf:toggle
Date/String operations
File operations
XML operations
Database/Communication
Use Cases
Software Licence
Search...
mpfserver
/
Directives
mpf:switch | selecting variable values
mpf:switch/case
you may substitute several if/else-conditions by using mpf:switch/case-token
switching is supported by variable-tokens only (cannot used with "mpf:param"-token, "mpf:env"-token and others)
Examples
{
mpf:
switch
}
... {
/
mpf:
switch
}
=
[myvar]
name of variable that will be used to check cases
||
=[lowercase|uppercase|upperfirst]
convert value string
||
=[url|html|html-chars|crypt]
encode value to another format
||
=[left|right|both]
remove whitespaces from value
||
[opr][condition]
condition may be used to check value before storing it in a variable
{
mpf:
case
}
[condition][myvalue]
condition operator, followed by value. "mpf:case"-token does not only provide equal-operations - you may use any available condition operator.
||
data=[mydata]
data to be display if case is true
||
convert=[lowercase|uppercase|upperfirst]
convert value string
||
encode=[url|html|html-chars|crypt]
encode value to another format
||
trim=[left|right|both]
remove whitespaces from value
||
convert_section=[lowercase|uppercase|upperfirst]
convert section data (for use with closing token only)
||
parse_section=[yes|no]
parse section data for mpf-tokens (for use with closing token only)
||
encode_section=[url|html|html-chars|crypt]
encode section data to another format (for use with closing token only)
||
trim_section=[left|right|both]
remove whitespaces from section data (for use with closing token only)
||
[opr][condition]
condition may be used to check value before storing it in a variable
2004 by master-p-formance.All rights reserved.
This manual is generated on the fly using mpfserver and
MPFT (mpf transformation).