Changing All Caps Blog Titles To First Letter Caps

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Changing All Caps Blog Titles To First Letter Caps

Post by Maccsta »

All my blog titles are written in ALL CAPS and there are literally thousands. Is there any way to change the title automatically to just having the first letter of each word in caps?

E.g. change ‘MY BLOG TITLE’ to ‘My Blog Title’ for all my blog titles

Changing them all manually would take far too long. Thought someone on here might know a quick solution with Serendipity.

Thanks for any suggestions :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Re: Changing All Caps Blog Titles To First Letter Caps

Post by sonichouse »

The easiest/quickest way is to edit your stylesheet and add

Code: Select all

text-transform:capitalize;
to your h1.
Steve is occasionally blogging here
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Changing All Caps Blog Titles To First Letter Caps

Post by yellowled »

sonichouse wrote:The easiest/quickest way is to edit your stylesheet and add

Code: Select all

text-transform:capitalize;
to your h1.
... if your entry title is in fact a h1.

It really depends on your template, but usually

Code: Select all

.serendipity_title { text-transform: capitalize; }
is more likely to work.

YL
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: Changing All Caps Blog Titles To First Letter Caps

Post by Maccsta »

sonichouse wrote:The easiest/quickest way is to edit your stylesheet and add

Code: Select all

text-transform:capitalize;
to your h1.
Thanks sonichouse. However the title remains the same when I add that to the CSS file.

Code: Select all

#serendipity_banner h1 {
text-transform:capitalize;
}
Also I noticed if I use {text-transform:lowercase} the banner text changes to lowercase but the title in my browser remains the same in All Caps.
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: Changing All Caps Blog Titles To First Letter Caps

Post by Maccsta »

yellowled wrote:
sonichouse wrote:The easiest/quickest way is to edit your stylesheet and add

Code: Select all

text-transform:capitalize;
to your h1.
... if your entry title is in fact a h1.

It really depends on your template, but usually

Code: Select all

.serendipity_title { text-transform: capitalize; }
is more likely to work.

YL
Hi Yellowled thanks.

This just changes the title above the blog post, not the banner title and more importantly the title in my browser menu bar.

However because my title is all caps already using capatalize will have no effect. I was wanting the title in title case ie 'My Blog Title' not 'MY BLOG TITLE'
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Re: Changing All Caps Blog Titles To First Letter Caps

Post by sonichouse »

Maccsta wrote:However because my title is all caps already using capatalize will have no effect. I was wanting the title in title case ie 'My Blog Title' not 'MY BLOG TITLE'
Can you post a link to your site ?
Might be easier to diagnose :)

You may need to edit the index.tpl to add

Code: Select all

capitalize:true
as a smarty modifier to the title block - although I haven't tested this myself.
e.g.

Code: Select all

<title>{$head_title|@default:$blogTitle|capitalize:true} {if $head_subtitle} - {$head_subtitle|capitalize:true}{/if}</title>
Steve is occasionally blogging here
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Changing All Caps Blog Titles To First Letter Caps

Post by yellowled »

Maccsta wrote:I was wanting the title in title case ie 'My Blog Title' not 'MY BLOG TITLE'
You can simply change the blog title in your admin backend. "Administration/Configuration" -> "General settings" -> "Blog name" (and optionally "Blog description").

If those are not in capital letters, your template is modifying them. In that case, you're gonna have to modify your index.tpl the way sonichouse pointed out.

YL
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: Changing All Caps Blog Titles To First Letter Caps

Post by Maccsta »

sonichouse wrote:
Maccsta wrote:However because my title is all caps already using capatalize will have no effect. I was wanting the title in title case ie 'My Blog Title' not 'MY BLOG TITLE'
Can you post a link to your site ?
Might be easier to diagnose :)

You may need to edit the index.tpl to add

Code: Select all

capitalize:true
as a smarty modifier to the title block - although I haven't tested this myself.
e.g.

Code: Select all

<title>{$head_title|@default:$blogTitle|capitalize:true} {if $head_subtitle} - {$head_subtitle|capitalize:true}{/if}</title>
Thanks sonichouse. Only just come back to this because these changes weren't top priority, but I was able to achieve what I wanted with:

Code: Select all

<title>{$head_title|@default:$blogTitle|lower|capitalize:true} {if $head_subtitle} - {$head_subtitle|lower|capitalize:true}{/if}</title>
I added "lower" smarty command and was able to turn the title to lowercase and "capitalize" gave me title case.

Thanks again :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Re: Changing All Caps Blog Titles To First Letter Caps

Post by sonichouse »

Maccsta wrote:Thanks sonichouse. Only just come back to this because these changes weren't top priority, but I was able to achieve what I wanted with:

Code: Select all

<title>{$head_title|@default:$blogTitle|lower|capitalize:true} {if $head_subtitle} - {$head_subtitle|lower|capitalize:true}{/if}</title>
I added "lower" smarty command and was able to turn the title to lowercase and "capitalize" gave me title case.

Thanks again :)
No problem, glad it helped, looks like you have hit the nail on the head :lol:
Steve is occasionally blogging here
Post Reply