Tutorials References Exercises Videos Menu
Free Website Get Certified Upgrade

Template Filter - capfirst


Example

Write the animal as a header (with the first letter in upper case):

<h1>{{ animal|capfirst }}</h1>
Run Example »

Definition and Usage

The capfirst filter capitalizes the first letter of the value.


Syntax

Template filters are defined by using a pipe | character followed by the name of the filter.

{{ value|capfirst }}