Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Different 'Titles' for each category

Quote Reply
Different 'Titles' for each category
Hi,
It's me again.

I am trying to get a different web page title for each category for the detailed pages and have tried lots of different codes but I am stuck.

I am using site_html.pl and at the top I have created variables to use throughout the program as follows:-

$site_title = "Garden Sheds, Summer & Leisure Buildings, Log Cabins, Playhouses, Greenhouse, Conservatories & Shed Plans";
$site_sheds_title_usa = "Garden Sheds-Summer Buildings-Log Cabins-USA America ";
$site_sheds_title_gb = "Garden Sheds-Summer Buildings-Log Cabins-UK Great Britain N Ireland ";
$site_sheds_title_canada = "Garden Sheds-Summer Buildings-Log Cabins-Canada ";

I then go to the create detailed pages:-

##########################################################
## Detailed View ##
##########################################################
sub site_html_detailed {
# --------------------------------------------------------
# This routine will build a single page per link. It's only
# really useful if you have a long review for each link --
# or more information then can be displayed in a summary.
#


and for the Title I have changed this to the following:-

<title>~;
if ({$category_name eq "United-States"}) { $output .= qq~ $site_sheds_title_usa ~; }
if ({$category_name eq "Great_Britain"}) { $output .= qq~ $site_sheds_title_gb ~; }
if ({$category_name eq "Canada"}) { $output .= qq~ $site_sheds_title_canada ~; }
$output .=qq~</title>

What I want is when the detailed page is a United-States category it uses $site_sheds_title_usa and when it is Great_Britain it used $site_sheds_title_gb etc.

What it does is adds all the above in the Title as follows:-

<head>
<title> Garden Sheds-Summer Buildings-Log Cabins-USA America Garden Sheds-Summer Buildings-Log Cabins-UK Great Britain N Ireland Garden Sheds-Summer Buildings-Log Cabins-Canada </title>

Is there a way so that it can select just the title for each category?

My website is http://www.gardenbuildings.com/directory/

Thanks in advance.

Regards,
Robin
Subject Author Views Date
Thread Different 'Titles' for each category robinantill 3793 Dec 21, 2004, 2:29 PM
Thread Re: [robinantill] Different 'Titles' for each category
PerlFlunkie 3698 Dec 21, 2004, 6:35 PM
Post Re: [PerlFlunkie] Different 'Titles' for each category
robinantill 3692 Dec 22, 2004, 9:31 AM