| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to Change the X-cart title code... | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Without it changing other aspects of my cart?
I tried adding it directly into the "Company name" field, but then it appears on the navigation tree and probably other places that I didn't notice. I want to add a slogan after the domain name so it looks like this: domain.com - slogan and when viewing the product pages or any other Xcart page that places text after the domain I want the slogan to be in there right after the domain. I tried playing with this code in home.tpl: Code:
but it never would put it in the right spot or it would appear twice. How do I get my slogan to appear after the domain name, but still include the default category and product title code after the slogan on those pages, while only the domain name and slogan appear on home.php? Can somebody please help? Thanks!
__________________
Version 4.0.9 |
|||||||
#2
|
|||||||
|
|||||||
![]() I set up a language variable called $lng.lbl_seo_title which I put my slogan in.
Then put it right after the last {/section} like this: Quote:
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#3
|
|||||||
|
|||||||
![]() How do I create a "language variable"?
__________________
Version 4.0.9 |
|||||||
#4
|
|||||||
|
|||||||
![]() Quote:
Xcart Administration -> Languages -> Edit Language (select your default language from pulldown) -> Select topic (Label, Text, E-mail, Errors, Languages, Countries) -> Add your own variable using the text input boxes below "Add new entry" -> Apply changes |
|||||||
#5
|
|||||||
|
|||||||
![]() Didn't work. Created the "language variable" called "lbl_seo_title" with the slogan and put this into the home.tpl:
Code:
but it didn't show any slogan in any of the titles.
__________________
Version 4.0.9 |
|||||||
#6
|
|||||||
|
|||||||
![]() Hmmm strange definately works for me and I can't remember making any other changes. Only difference is your on a different version but the original code looks exactly the same as mine.
Did you navigate further into the store than the home page? The home page title will still be controled by the index.html page but once you get past that the lbl_seo_title takes over. I set my language variable up as a Label. No idea if this makes a difference (I wouldn't have thought so) but worth checking and changing if your is different.
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#7
|
|||||||
|
|||||||
![]() OK I tried it again and here's what I did / happened:
Here's my original code: Code:
As per your instructions I added the line: Code:
Code:
It looks like my code differs from yours slightly, I don't have the strip code before the title and a few other smaller things. Here's the error I get when using that code: Code:
If I remove the two strip codes then the frontpage (home.php) finally came up, but there is no slogan appearing in the browser title on home.php or any other page. I did recreate the langauge entry as a label before all of this. Do you have any more ideas of how I can get this to work?
__________________
Version 4.0.9 |
|||||||
#8
|
|||||||
|
|||||||
![]() Sorry only just come back to this post. Did you finally get it working?
If not the error message is telling you that you need to place the strip code before the title (as well as after) Remember commands like that always come in pairs so if you miss an opening or closing tag from the pair then you will get a 'mismatch' type error.
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
#9
|
|||||||||
|
|||||||||
![]() Hi, this mod interests me, as I too want to append a phrase to the Company Name (i.e. that which is specified in General Settings -> Company Options) but only in the TITLE section of the HTML source. Is that what your mod does? Can you give me a quick explanation of how it works, so I can be sure that it's what I want before I implement it? I'd really appreciate it.
__________________
Started out with Version 4.0.13 . Upgraded to Version 4.0.14 on 27 Jun 2005 . Upgraded to Version 4.0.17 on 04 Dec 2005 . Upgraded to Version 4.0.19 on 24 Oct 2006 . |
|||||||||
#10
|
|||||||
|
|||||||
![]() Yes that's exactly what this mod does. Easiest way to see what it does is to implement it as it's a very minor mod and easily changed back if you don't like it.
I can't claim any credit for it though, it was something I picked up from another post on these forums: http://forum.x-cart.com/viewtopic.php?t=9907&highlight=title+strip
__________________
X-Cart Gold 4.0.12 X-AOM, X-RMA, X-FancyCat Apache/Linux Server PHP 4.3.8 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|