I'm using the {segment_2} variable to complete various bits of info on a page. The segment is all lowercase, but that's fine as I'm using CSS to capitalize those elements.

The problem comes when I'd like to use that {segment_2} in the page title. It's appearing all in lowercase and I can't figure out how to make it appear in sentence case.

Any ideas would be appreciated!

Thanks in advance,


  • 1
    Is segment_2 a category? Commented Nov 19, 2013 at 16:31

2 Answers 2


Install the Streeng plugin.

Perform common operations on strings. Change case, truncate, find/replace, repeat, encode/decode, generate slugs and more.

One of the parameter options is capitalize="yes" which lets you capitalize the first character of the string.

  • Please select my answer as correct if this worked for you
    – Anna_MediaGirl
    Commented Nov 21, 2013 at 15:57

CE String is another great option.

CE String is a string manipulation tool for use in your ExpressionEngine templates. It is feature-packed, and allows you to manipulate strings (text) with very simple syntax.

You would just do:

{exp:ce_str:ing strtoupper}{segment_2}{/exp:ce_str:ing}

CE String has tons of other useful methods. And the chaining feature that lets you use more than one method can come in handy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.