Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Changing the default / for titles, keyword, etc..

Quote Reply
Changing the default / for titles, keyword, etc..
Hello,

Can someone tell me how to change the default way that the system creates the title to display a / when the user visits a secondary category to a space then - space as it stands now suppose you add a category shopping then you click the link from the homepage and then choose a subcategory like clothing. In the title it displays Shoping/Clothing and we would like to change this so it would be like this
Shopping - Clothing please help.. Thanks so much. It appears that hotscripts.com has done this and changed the / to ::

Thanks again,

Kato
Quote Reply
Re: [kato] Changing the default / for titles, keyword, etc.. In reply to
Try this global;

Code:
sub {

my $code = $_[0];
$code =~ s,/,:,g;
return $code;

}

Call it with the following;

<%global_name($title_linked)%>

That should work Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Changing the default / for titles, keyword, etc.. In reply to
Hi Andy,

Ok... I am brand new at this. Can you explain a bit more? Where would I create this global and where would I place it on a page to call it to make the title use this? Blush Thanks again.
Quote Reply
Re: [kato] Changing the default / for titles, keyword, etc.. In reply to
To create the global, goto Build > User Globals , then, at the bottom of that page, there is space to create a new global. Enter the codes that I posted in the box, and call it something like edited_linked. Then submit it, and goto Edit Templates. Load the 'category.html' one, and replace the <%title_linked%> tag with <%edited_linked($title_linked)%>.

Then load up page.cgi (click 'dynamic' at the top of the admin panel), and browse into a category.

Does it show the edited title, with the : instead of / ?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Changing the default / for titles, keyword, etc.. In reply to
Hmmm... Doesn't seem to work for me. Anyway, would need this for the static pages. Thanks
Quote Reply
Re: [kato] Changing the default / for titles, keyword, etc.. In reply to
You wanna PM over login details? I'll have a look for you. It should be pretty simple. Once its up, I bet you will feel silly with how simple it is Crazy (I'm off to bed in 30 mins).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Changing the default / for titles, keyword, etc.. In reply to
I know this is an old thread, but it seems to be the most relevant that I could find

Basically I'm trying to change the sub-category title format from being:
Code:
Category/SubCategory

to something like:
Code:
Category - Subcategory

or even a variation on that ...

The default global in category.html is
Code:
<%category_name%>

And trying out the global you provided didn't work ....

So, how could I do it??

Frown
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Changing the default / for titles, keyword, etc.. In reply to
Make a new global called edit_title, with the following code;

Code:
sub {
my $in = $_[0];
$in =~ s/\// - /sig;
return $in
}

Then call with;

<%edit_title($category_name%>

That should work Angelic
Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Changing the default / for titles, keyword, etc.. In reply to
You rock!!

That works perfectly :)

Thanks!!
Blacknight Solutions - Hosting
Search.ie
Armchair.ie
Quote Reply
Re: [blacknight] Changing the default / for titles, keyword, etc.. In reply to
In Reply To:
You rock!!

That works perfectly :)

Thanks!!

Cool <G>

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Changing the default / for titles, keyword, etc.. In reply to
If you want to see how it looks drop over to Irish Search
Blacknight Solutions - Hosting
Search.ie
Armchair.ie