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

How to show current page only in title tag?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-19-2008, 08:14 PM
 
Don Rajiv Don Rajiv is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 56
 

Default How to show current page only in title tag?

Hi,

Anybody help me how to show current page in title instead of showing

Product name :: Category name :: Company name. I want to include extra one option in SEO option in the dropdown list as "Current Page Only" it is possible ?


Thanks in advance
__________________
x-cart-4.1.9gold

Convertible Car Tops
Reply With Quote
  #2  
Old 11-20-2008, 12:44 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: How to show current page only in title tag?

As far as I understand you need to change section
HTML 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>
in skin1/customer/home.tpl to
HTML 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 $config.SEO.page_title_format eq "B"}{if not %position.first%}&nbsp;::&nbsp;{/if} {$location[position].0|strip_tags|escape} {elseif %position.first%} {$location[position].0|strip_tags|escape} {/if} {/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>

and execute MySQL query in Patch/UPGRADE section:
Code:
UPDATE xcart_config SET variants='A:Shop name :: Category name :: Product name\r\nD:Product name :: Category name :: Shop name\r\nB:Current page' WHERE category="SEO" AND name="page_title_format"
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 11-20-2008, 06:32 AM
 
Don Rajiv Don Rajiv is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 56
 

Default Re: How to show current page only in title tag?

Thankyou Victor thanks for your kindly help your code successfully worked
__________________
x-cart-4.1.9gold

Convertible Car Tops
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 03:19 PM.

   

 
X-Cart forums © 2001-2020