X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to show current page only in title tag? (https://forum.x-cart.com/showthread.php?t=43782)

Don Rajiv 11-19-2008 08:14 PM

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

Victor D 11-20-2008 12:44 AM

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"

Don Rajiv 11-20-2008 06:32 AM

Re: How to show current page only in title tag?
 
Thankyou Victor thanks for your kindly help your code successfully worked


All times are GMT -8. The time now is 06:38 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.