I feel really stupid asking this question, but if I want to make some changes to an existing variable in the controller before it is rendered in the template, such as $Content or $Title or a custom field such as $AuthorName for example, how can I do this? I just can't seem to find instructions on how to do this in the tutorials or the forums. Can someone point me to the right page that explains how to accomplish this?
If someone tells me to RTFM, I'm really sorry that I'm such an idiot, but I just cannot find any information about this anywhere on Google or the Silverstripe tutorials/forums, and I tried really really hard. So would very much appreciate it if you can point me to the right URL.
i think i have the same problem as stinkytofu,
and im not that familiar with silverstripe and the mvc framework.
I want to check $MenuTitle string-length to define another Menu CSS class before its been replaced by its Content.
I want to try it by creating a new php-method into my pagetype controller, but i i dont know how to assign $MenuTitle to this funcion