Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Modifying Document Title on Homepage

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-20-2008, 02:13 PM
 
shiehshieh shiehshieh is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 85
 

Default Modifying Document Title on Homepage

Sorry guys, I'm sure this is posted some where on this forum, but I just wasn't able to find it. How do I change the document title for the main home page?

Right now when you go to the our homepage, the document title is [Company Name]. But how do I modify this to include the keywords that I want? For example, [Company Name] - [keyword1], [keyword2], [keyword3]...

Thanks so much in advance.
__________________
Cheers,
Tom
X-Cart v4.1.9 PRO

Boba Tea Direct
"Your source for bubble tea, boba, coffee, tea, chai, and more"
www.bobateadirect.com

Hevla Coffee Co
Freshest roast-to-order low acid coffee
www.hevlacoffeeco.com
Reply With Quote
  #2  
Old 10-21-2008, 04:46 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Modifying Document Title on Homepage

The short answer is it can't be done. There is a thread at http://forum.x-cart.com/showthread.php?t=23114 discussing this but so far no one has come up with a solution. The problem is, as long as 'lbl_site_title' remains empty, the Company name option value defined in the General settings/Company options section will be used as the site title instead of 'lbl_site_title'. If, however, you choose to assign a value to 'lbl_site_title', you will be able have different values for your company name and site title, but lbl_site_title will be shown on every page on your site at the beginning of the breadcrumb trail.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 10-21-2008, 04:52 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Modifying Document Title on Homepage

Not true at all. In customer/home.tpl, replace this:

Code:
<title>{strip} {capture name=title} {if $config.SEO.page_title_format eq "A"} {section name=position loop=$location} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {else} {section name=position loop=$location step=-1} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {/if} {/capture} {if $config.SEO.page_title_limit <= 0} {$smarty.capture.title} {else} {$smarty.capture.title|replace:"&nbsp;":" "|truncate:$config.SEO.page_title_limit|replace:" ":"&nbsp;"} {/if} {/strip}</title>

with this:

Code:
<title> {if $main eq "catalog" and $current_category.category eq ""} Insert your keyword-rich title here {else} {strip} {capture name=title} {if $config.SEO.page_title_format eq "A"} {section name=position loop=$location} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {else} {section name=position loop=$location step=-1} {if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {/section} {/if} {/capture} {if $config.SEO.page_title_limit <= 0} {$smarty.capture.title} {else} {$smarty.capture.title|replace:"&nbsp;":" "|truncate:$config.SEO.page_title_limit|replace:" ":"&nbsp;"} {/if} {/strip}{/if}</title>
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 10-21-2008, 05:32 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Modifying Document Title on Homepage

I can't believe it was that easy. I have been looking for how to do this for about 4 years, and there are numerous threads on the same subject. Thanks Padraic!
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #5  
Old 10-22-2008, 02:52 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default Re: Modifying Document Title on Homepage

I generaly set a config variable or language variable up for this and make the same adjustment
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #6  
Old 10-22-2008, 04:01 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Modifying Document Title on Homepage

This should be in questions asked a million times. As I said, it is something I have spent years looking for, and have asked about several times. There are numerous threads scatter around the forum and this is the first time anyone had the solution.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #7  
Old 10-22-2008, 04:08 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Modifying Document Title on Homepage

Will do
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 10-28-2008, 02:05 PM
 
joyla joyla is offline
 

Member
  
Join Date: Feb 2008
Posts: 12
 

Wink Re: Modifying Document Title on Homepage

Watch Out !
Not replac e but replace!

I copied this passage to home.tpl and got a smarty debug error
Our webshopping mall didn't work for short time until I found this error.
But anyway, I appreciate for excellent Mr.Bailor's advice to solve problem
to change the title of main page.

I hope Nobody experience same situation like me after posting this quote!
Thanks Everybody!!
__________________
JoyLA
x-cart-4.1.9pro
Reply With Quote
  #9  
Old 10-28-2008, 02:19 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Modifying Document Title on Homepage

Huh?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 11-14-2008, 09:08 AM
 
espresso espresso is offline
 

eXpert
  
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 227
 

Default Re: Modifying Document Title on Homepage

Balinor, just brilliant Thank you.
__________________
Rene
End user - merchant
In the upgrade process 4.6.6 to 5.4.x


Mods I miss in 5.4.x:
xCMS, Create-A-Sale, On-Sale AC, Kit Builder AC, Manufacturer-A-Z BCSE, Product-Bundle BCSE, Pre-Order BCSE, Customer Quotes BCSE
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:54 AM.

   

 
X-Cart forums © 2001-2020