Remove auto-capitalization in page title {exp:tag:tag_name}
Posted: 16 June 2008 11:50 AM   [ Ignore ]
Newbie
Rank
Total Posts:  15
Joined  2007-12-27

Hi there,

First off, the Tag module is sweet!

Quick question, I’m using {exp:tag:tag_name} in my page title’s for the tag pages. I use lots off acronyms, so it looks a bit goofy when it’s formatted. For instance, “Items tagged: Html tutorial.”

It’s a minor gripe, but I’d love to be able to override the capitalization (bonus for full control, all lowercase is acceptable). I have it set use lowercase for the tags themselves.

I’m assuming this could be done by turning on PHP for that template and wrapping the tag in the title inside a PHP statement. Being a PHP rookie, I figured I’d ask.

Thanks in advance!

Profile
 
 
Posted: 16 June 2008 12:04 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

There’s no way to override this individually if that’s what you’re after.

There’s obviously no way to have it show “HTML Tutorial” which would be upper case for one, and “Proper” case for the other. smile

Unless of course you’re after a full override, then perhaps a parameter with options of “uppercase”, “lowercase”, “sentencecase”, and “propercase”.

Until then, you have PHP… here’s how you would do it in your case for complete upper case: wink

<?php
$str 
"{exp:tag:tag_name}";
$str strtoupper($str);
echo 
$str
?> 
 Signature 
Profile
 
 
Posted: 16 June 2008 01:50 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  15
Joined  2007-12-27

Thanks for the quick reply!

If I had to choose, I’d go with lower. So I could do it like you suggest, but with

strtolower 

correct?

Profile
 
 
Posted: 16 June 2008 03:18 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

Correct smile

 Signature 
Profile
 
 
Posted: 16 June 2008 05:18 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  15
Joined  2007-12-27

Cool, thanks so much.

Profile
 
 
Posted: 22 June 2008 08:20 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  15
Joined  2007-12-27

Follow up for anybody trying to this in the future – works like a charm.

Profile
 
 
Posted: 17 October 2008 07:08 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

This is now available with the new version of Tag 2.5 smile
http://www.solspace.com/forums/viewthread/661/

 Signature 
Profile
 
 
Posted: 17 October 2008 08:42 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  15
Joined  2007-12-27

Very cool, great to see developers who are responsive to their users. Thanks!

Profile