1. WakeupData Knowledge base
  2. Expression Engine Playbook

How to change letter casing

In this article, we will outline how to change letter casing using the expression engine.

Use case:

Let's say you have a product title that comes in lowercase, and you wish to change the letter casing to either capitalize the first word or have each word starting with a capital letter. For example:

Your title: 

blue and green sneaker

The desired outcome:

- Blue and green sneaker
- Blue And Green Sneaker

Here is how it works:

                                            The commands you will write are as follows:

- to capitalize the first letter of the first word: capitalize(field1)
- to capitalize the first letter of all the words: GetTitle(field1)