Optimizing Page Title Text
From what I've read, extra spaces or non-displaying characters (like CR or LF) make search engines unhappy, so to speak. I've noticed that x-cart seems to put some of those in there however.
The following smarty 2.5.x code will fix that problem. Add to customer/home.tpl Code:
{assign var="loc" value=" "} Walt |
Hey, thanks for posting that code Walt. Am I the only one in four months to make use of it? ;)
BTW, if anyone else has tried this, do you also get alot of spaces generated in the output source code between the </head> and <title> tags? I do, is this going to be of a problem to spiders? |
Hmmmm... I wonder if this works? Looks good, little bit scared to try it, but always like to improve. :lol: Thanks walteis nice post.
|
Or you could just take your existing code for the title tag and add the {strip} tag. This tag strips out all the extra line feeds in HTML.
Example from 3.5.x: Code:
{strip} |
telafirma,
your code causes {/strip} to be displayed on the home page, I tried moving it before </title> but then it causes {/strip} to be added onto the title of the page ie X-cart Books {/strip} is there an easier way or did i read the code wrong? |
oops... my fault. I failed to take into account the {strip} tags that were already in the code.
Try this: Code:
{strip} |
eh xa lent, thanks telafirma, worked beautifully
|
TelaFirma: Thanks for taking the time to post! worked excellent. It was high on my list of 'mods' that shockingly are not included in the X-Cart package.
Matt Curtek Systems - http://www.curtek.com |
Very handy, thanks for sharing.
|
I'm sorry to ask, but for the very lay shop owners amongst us, can you just briefly explain in plain language what this bit of code achieves.
It's got pretty good reviews, so I'm sure it's a worthy mod to adopt, but it would greatly help if I could understand exactly what effect it has on the store's appearance or workings. Thanks in advance, |
Your page title is generated dynamically by X-Cart based up on location.
This changes the default code and optimises the title to be more search engine friendly. Search Engines take several factors into account when spidering a page, and the title text is an important factor to how the page gets placed in a Search Engine's index. |
In addition, with the original x-cart code often page titles appear like this:
<title>Site Title Here - Product Name </title> This code changes the text to appear on 1 line: <title>Site Title Here - Product Name</title> Which is more search engine spider friendly. |
Jon / adpboss .. thanks greatly for elaborating. I really had trouble understanding this one. On the surface, this is just such a minor change but I'll take your word for it about its potential importance and adopt the change.
I presume the x-cart people would know the importance of such formating also and can't help but wonder why they wouldn't adopt this into the base product. Its not as if the whole x-cart community wouldn't benefit, nor that there was likely to be disagreement as to the mods worth. I thought there was a thread here for enhancement suggestions to the base .. shouldn't this be offered up there. Thanks again, |
It could go in Wishlists, but X-Cart has bigger fish to fry than this.
Their code works just fine. This is a modification or enhancement. It won't make or break your store, none of these modifications will. But if you understand what these mods do, and how they do it, then you can add some nifty features and useful stuff to your site. |
All times are GMT -8. The time now is 02:35 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.