Attention

TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.

format.case

Modifies the case of an input string to upper- or lowercase or capitalization. The default transformation will be uppercase as in mb_convert_case.

Possible modes are:

lower

Transforms the input string to its lowercase representation

upper

Transforms the input string to its uppercase representation

capital

Transforms the input string to its first letter upper-cased, i.e. capitalization

uncapital

Transforms the input string to its first letter lower-cased, i.e. uncapitalization

capitalWords

Not supported yet: Transforms the input string to each containing word being capitalized

Note that the behavior will be the same as in the appropriate PHP function mb_convert_case; especially regarding locale and multibyte behavior.

Examples

Default

<f:format.case>Some Text with miXed case</f:format.case>

Output:

SOME TEXT WITH MIXED CASE

Example with given mode

<f:format.case mode="capital">someString</f:format.case>

Output:

SomeString

Arguments

value

DataType

string

Required

false

Description

The input value. If not given, the evaluated child nodes will be used.

mode

DataType

string

Default

'upper'

Required

false

Description

The case to apply, must be one of this' CASE_* constants. Defaults to uppercase application.