By AndyW on
I have user-generated content so a lot of the titles submitted are capitalized.
I went into my template and just changed the title as so ucwords($title) and it had... no effect...
I thought perhaps this would be simple to implement, and ideas Drupal people?
Comments
The default template
The default template (Garland) has two instances of $title being printed. One is in the node.tpl.php and the other is in page.tpl.php.
However, the better way to do it is using template_preprocess_node() function (http://api.drupal.org/api/function/template_preprocess_node/6) to change the variable (it would be $node->title) before it gets to the template.
do this ...
do this ... ucwords(strtolower($title)) ...
That's it, that works Press
That's it, that works
Press Release 001 | Do Follow 001
Another solution is to
Another solution is to modify the title appearance through CSS.
This way, you will have more control over the display of the text, oppose to hard coding it into the template file.