View more context

 

Jennifer Tigner

{$something.Uppercase} works so I was hoping there is an equivalent here for the first letter

brett.tasker

You will probably need to write a custom function in your Controller for the template to take an input string, apply ucfirst to it, and return the result. Eg

  1. public function capfirst($string = '')
  2. {
  3. return ucfirst($string);
  4. }

Then you can call that function within your template

  1. <p><% capfirst($something) %></p>
Terry Apodaca

it's actually less code and doesn't run the threat of users turning of JS

Terry Apodaca

but throwing the JS way out there if he insists on doing it only in the template

LiamC

how to you return an output function within an extension? Im trying to call a required js file in a product category extension