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)
-   -   Title script!!! (https://forum.x-cart.com/showthread.php?t=9383)

rjcbear 09-15-2004 05:03 PM

Title script!!!
 
Hey guy,

I am looking for the post about a script that generates the product name for the TITLE of the page.
I looked for this script for several hours here in the forum and I cant find it. If some one has it or they remember the post would you please point me in the rigth direction.

As always thank you in advance.

Kind regards,
Ricky

magnumkp 09-16-2004 12:51 AM

It's in customer/home.tpl.

Code:

<title>{$lng.txt_site_title} {if $main eq "catalog"}
{if $location eq ""}  {$lng.txt_subtitle_home}
{else}
{strip}
{section name=position loop=$location start=0 }
{if %position.last% eq "true"} - {$location[position].0|escape}{/if}
{/section}
{/strip}
{/if}

{elseif $main eq "product"}
{if $product.product ne ''} - {$product.product}{/if}

This is a slightly customised title script but the bit you need is {$product.product}. Hope this is what you are looking for.

rjcbear 09-16-2004 06:52 AM

Quote:

It's in customer/home.tpl.

Code:

<title>{$lng.txt_site_title} {if $main eq "catalog"}
{if $location eq ""}  {$lng.txt_subtitle_home}
{else}
{strip}
{section name=position loop=$location start=0 }
{if %position.last% eq "true"} - {$location[position].0|escape}{/if}
{/section}
{/strip}
{/if}

{elseif $main eq "product"}
{if $product.product ne ''} - {$product.product}{/if}



This is a slightly customised title script but the bit you need is {$product.product}. Hope this is what you are looking for.

The code above will put the Site Title first follow by the Product name as part of the page Title.
This is my ignorance but I do not have a clue how to flip them so It will display the Product name first then the Site title as is done in the to links below.

http://worldbodyjewelry.net/xcart/catalog/zodiac-dangle-belly-button-rings-p-933.html

http://worldbodyjewelry.net/xcart/catalog/14g-5-8-double-jeweled-straight-barbell-p-317.html

http://worldbodyjewelry.net/xcart/customer/home.php?cat=101

Thank you for all your help

Kind regards,
Ricky

magnumkp 09-17-2004 12:46 AM

Put the {$lng.txt_site_title} at the end of that script just before the </title> tag. You will get hypens in the wrong place so you will have to move those about (or remove them completely) but you can see these quite easily in the code.


All times are GMT -8. The time now is 03:49 AM.

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