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

How to Separate Home Page SEO from CAT & Product pages?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #31  
Old 03-28-2008, 04:38 PM
 
GlobalFusion GlobalFusion is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 82
 

Default Re: How to Separate Home Page SEO from CAT & Product pages?

It took me all afternoon to figure this out, but after reviewing my smarty ebook it became obvious. This is what worked for 4.1.8:

Your Meta Description and Meta Keywords for categories and sub-categories should be filled in.

In admin, go to General Settings >> SEO Option. Uncheck:
  1. Include categories' META data into the site meta tags:
  2. Include products' META data into the site meta tags:
Open meta.tpl and find lines 27 to 33. Code should be similar to this unless you made some changes:
HTML Code:
{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "Y"} {assign var="_meta_descr" value="$_meta_descr`$current_category.meta_descr` "} {assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "} {/if} {assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"} {assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}

Change:
HTML Code:
{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "Y"}

For
HTML Code:
{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "N"}
(the only thing that changed here was ⌠Y■ for ⌠N■)

Add
HTML Code:
{else}

After
HTML Code:
{assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "}

Remove
HTML Code:
{/if}

Right after the recently placed
HTML Code:
{else}

Finally, add
HTML Code:
{/if}
After
HTML Code:
{assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}

The new code should look like this:
HTML Code:
{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "N"} {assign var="_meta_descr" value="$_meta_descr`$current_category.meta_descr` "} {assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "} {else} {assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"} {assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"} {/if}

Hope this works for you folks
__________________
------------------------------------------------------------------
X-Cart Gold V 4.1.8 + Mods
Reply With Quote
  #32  
Old 03-28-2008, 04:49 PM
 
balinor balinor is offline
 

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

Default Re: How to Separate Home Page SEO from CAT & Product pages?

Sorry, didn't see this post until now
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #33  
Old 03-28-2008, 04:52 PM
 
GlobalFusion GlobalFusion is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 82
 

Default Re: How to Separate Home Page SEO from CAT & Product pages?

Too late my friend lol. Thanks for pointing out the meta.tpl
__________________
------------------------------------------------------------------
X-Cart Gold V 4.1.8 + Mods
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 01:42 AM.

   

 
X-Cart forums © 2001-2020