Hello (maybe a little late).
QUOTE
Is there any way to force the first letter to be uppercase, but leave the rest of the word or phrase in lowercase?
I spent last weekend trying to resolve this problem. Searching here, there,, I found this 2 modifiers:
<$mt:PageTitle$ capitalize="1"> -> modifies the first char of each word of the phrase to Uppercase
<$mt:PageTitle$ upper_case="1"> -> modifies all chars the phrase to Uppercase
Then I discovered that if the site is published dynamically in php, php code can be inserted into the templates.
So, example:
CODE
<h1 id="page-title" class="asset-name"> <?php $title = '<$mt:PageTitle$>';echo ucfirst($title);?></h1>
--> Only first letter of title Uppercase.
But for the search result pages, whose URL is as follows: mt-search.cgi?blog_id=4&tag=tag&limit=20
the previous php code doesn´t works.. so investigating some javascript, I found this solution:
CODE
<h2 class="asset-name entry-title"><a href="<$mt:EntryPermalink$>" rel="bookmark"><$mt:EntryTitle$></a></h2>
<script type="text/javascript">
//<![CDATA[
var x = document.getElementsByTagName('h2');
for (var i=0;i<=x.length-1;i++)
{
if (x[i].innerHTML == '<a href="http://domain.net/site-path/<$mt:EntryTitle$>/" rel="bookmark"><$mt:EntryTitle$></a>') {
var newh2 = document.createElement("h2");
newh2.className = "asset-name";
var hyperlink = document.createElement("a");
hyperlink.setAttribute("href", "<$mt:EntryPermalink$>");
hyperlink.setAttribute("rel", "bookmark");
var title = '<$mt:EntryTitle$>';
title = title.slice(0,1).toUpperCase() + title.slice(1);
var text = document.createTextNode(title);
hyperlink.appendChild(text);
newh2.appendChild(hyperlink);
var previoush2 = x[i];
previoush2.parentNode.replaceChild(newh2, previoush2);
}
}
//]]>
</script>
regards