Gossamer Forum
Home : Products : Links 2.0 : Customization :

Getting rid of underscores in the title bar

Quote Reply
Getting rid of underscores in the title bar
Hey, all--

How do I change the appearance of category_name as it appears in the title bar? I've got it looking good in the page bodies, but in the title bar I'm still getting underscores (i.e. Arts_and_Entertainment).

Sorry if this is old hat. I ran a search on the forum, but couldn't dig anything up.

Thanks.

blane
Quote Reply
Re: Getting rid of underscores in the title bar In reply to
This is an old hat...

Wink

You need to edit the sub build_clean routine in your db_utils.pl file.

Replace your sub build_clean routine with the following codes:

Code:
sub build_clean {
# --------------------------------------------------------
# Formats a category name for displaying.
#
my ($input) = shift;
$input =~ s/_/ /g; # Change '_' to spaces.
$input =~ s,/, : ,g; # Change '/' to ' : '.
return $input;
}

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Getting rid of underscores in the title bar In reply to
This is what's so perplexing to me...

The routine you mention looks EXACTLY like the code you provided. I've also added two mods, one to change "and" into "&" and another to change "/" into ">".

Those changes are working beautifully, EXCEPT in the title bar of the browser window, where I'm getting my site name followed by stuff like "Arts_and_Entertainment/Movies/Titles". None of the formatting in the sub build_clean routine is getting used. Any other ideas?

Thanks again!

blane
Quote Reply
Re: Getting rid of underscores in the title bar In reply to
Ah...okay...the Browser location...You cannot change that. I had a lengthy discussion about this with another LINKS user about a month ago in the Discussion Forum. And this is NOT possible. If you remove the underscores, then you cannot access the directories in your site.

Because if you do...the spaces would be translated to %20 and this would not allow you to access the directories in your LINKS site.

Sorry for the confusion.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.




[This message has been edited by AnthroRules (edited April 16, 2000).]
Quote Reply
Re: Getting rid of underscores in the title bar In reply to
Okay....and you have NOT been very clear about your issue! You have confused me a lot in this Topic!

Okay...for the <title> anchors (which you should've referred to before rather than focusing in on the browser!)...you need to use the following codes:

Code:
<title><%site_title%>: <%category_clean%></title>

I sure hope that this answers your question!!!!!!!
!!!!!!!

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.




[This message has been edited by AnthroRules (edited April 17, 2000).]
Quote Reply
Re: Getting rid of underscores in the title bar In reply to
Also, there is a list of tags that you can use in the Edit Template screen after you select a template to edit. Click on the link that states something like Codes you can use.

This will take you to pages that lists tags that you can use in each template file.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Getting rid of underscores in the title bar In reply to
That did it! Sorry I wasn't clearer, but I thought category_name was the correct tag. It never occurred to me to use category_clean. Makes sense now though!

Thanks for the responses!

blane
Quote Reply
Re: Getting rid of underscores in the title bar In reply to
You're welcome.

Glad it is working now.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Getting rid of underscores in the title bar In reply to
No, not the URL field... but you're getting warmer... Smile

I'm talking about the actual title bar at the very top of the window. You know, the one that says the title of the page. In my templates I have it set to display the site_title and category_name. That's where I'm getting all the characters I'm trying to mask in the sub build_clean routine.

blane
Quote Reply
Re: [blane] Getting rid of underscores in the title bar In reply to
I've been searching everywhere, and I can't find a solution to a problem I'm having, so I'm hoping I can hop on this thread and get some answers. I'm trying to edit the way my title is displayed, but I can't come up with a solution. I have subcategories, for instance: A/Angel_Kelly.

Right now, the title displays as Site Name: A: Angel Kelly Pictures, Images, etc.

I'd like it to display as: Site Name: Angel Kelly

Is there a specific tag that cuts out the middle category? Right now I am using <%category_clean%> in my title tag. Please help.
Quote Reply
Re: [bobchezule] Getting rid of underscores in the title bar In reply to
You need to use <%title_linked%>.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Getting rid of underscores in the title bar In reply to
I'm sorry, I was unclear. I'm talking about the actual page title. What goes between the tags <title>Site Name: bla bla bla</title>

Right now, I have <%category_clean%> for the category name, but it outputs everything. For instance, if the category is A/Angel_Kelly it outputs: "Site Name : A : Angel Kelly" I'd like it to output just "Site Name: Angel Kelly" Is there any way to do this?
Quote Reply
Re: [bobchezule] Getting rid of underscores in the title bar In reply to
What about <%Title%>/<%title%> ???

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates