FR: Be able to specify a “category title”
Posted: 18 November 2004 04:14 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  279
Joined  11-30-2002

OK, I was all excited to see that version 1.2 allows you to use categories in the links. For example, instead of http://www.something.com/index.php/C1 you could have http://www.something.com/index.php/category/news. But then I saw that one of the requirements is that the category names have to use only alpha-numeric text. Since I have spaces and punctuation in my category names, I can’t use this feature. So, I’d like to be able to specify a Category Title for each category, just like how you can specify a Title and a URL Title. For example, if my category name was “News, Gossip, and More!”, I could type in “news_gossip_and_more” for the category title, and the category title would be used in the link instead.

Profile
 
 
Posted: 18 November 2004 04:22 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  36398
Joined  05-14-2004

I have a similar problem with the spaces and stuff, whatever is used to make url-titles would be perfect for this. wink

 Signature 
Profile
MSG
 
 
Posted: 18 November 2004 10:29 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  279
Joined  11-30-2002

Also if you have two categories with the same name, in the same weblog, then the current setup doesn’t work. You would have to have a category title.

Profile
 
 
Posted: 18 November 2004 11:47 PM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2081
Joined  05-13-2004

And I will be adding categories in Korean 한국말로 is obviously not alphanumeric.

 Signature 

CreateSean Web Design | EE Forums 4 You ExpressionEngine forum customization
on twitter @createsean I am the poster formally known as The Linguist.

Profile
 
 
Posted: 22 November 2004 10:23 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  26
Joined  07-29-2004

Sorry—nothing to add.
I just want to be notified when someone responds w/ a solution.
thx,
j

Profile
 
 
Posted: 23 November 2004 01:09 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
RankRankRankRankRank
Total Posts:  2508
Joined  12-21-2001

You could add a little scripting to your template to do this:

{exp:weblog:category_heading weblog="{master_weblog_name}"}

{if category_name
== 'personal'}
<h1>My Personal Stuff!</h1>
{/if}

{if category_name
== 'news'}
<h1>The News Page</h1>
{/if}

{
/exp:weblog:category_heading}

 Signature 
Profile
MSG
 
 
Posted: 23 November 2004 01:39 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  36398
Joined  05-14-2004

Eh, it’s the URL that I would like to have the proper category name, without having to use a workaround like that.  Not the heading, really. 

 Signature 
Profile
MSG
 
 
Posted: 29 November 2004 10:29 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  26
Joined  07-29-2004

FYI: Here’s a solution that works for me…

1. If you have a two-word category like “Breaking News”, re-name it in the category admin to “Breaking-News”.

2. Turn PHP “on” for your template and set the Parsing Stage to “output”.

3. Add the following code to template where you would like the category name to appear without the hyphen:

<?php $category = str_replace('-',' ', '{category_name}'); print "$category"; ?>

Your category_name will now print as “Breaking News” - but the URL will retain the hyphen.

joe

Profile
 
 
Posted: 30 November 2004 02:54 PM   [ Ignore ]   [ # 8 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1292
Joined  05-15-2004

I only have problems with the non-alphanumeric characters in my category titles—apparently the multiple-word category titles work fine, with underscores in place of spaces (new build?).

I could drop the non-alphanumeric character on one of my category titles, but I use a question mark on another one and I really want to keep it.

The idea of stripping out non-alphanumerics entirely, as in the URL titles of individual posts, seems like the best bet to me.

 Signature 

Scribe of Slog
The truth begs nobody’s pardon.

Profile
 
 
Posted: 29 July 2006 08:08 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  121
Joined  11-17-2005

Just like to add my voice to this FR. Neither of the workarounds really satisfy, for various reasons. I’d like to have category_title field like TextPattern for this.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 77520 Total Logged-in Users: 47
Total Topics: 101529 Total Anonymous Users: 19
Total Replies: 544291 Total Guests: 286
Total Posts: 645820    
Members ( View Memberlist )