| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
duplicate title | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
duplicate title
I am trying to validate the code on my site and I came across the following: on the pages where "Sort by" and/or page navigation bar is shown I get duplicate titles like this
<td class="SearchSortCell"><a class="SearchSortLink" href="cat-6-network-price-up-c-315.html" title="Sort by: Price" title="Cat 6 Network">Price</a></td> same goes for the page links <td class="NavigationCell"><a href="firewire-orderby-up-c-324-p-2.html" title="Page #2" title="FireWire">2</a><img src="/store_us/images/spacer.gif" alt="" /></td> it looks to me that this happens when the above results are called in {foreach} statement. the strange thing is: if I login as a customer the second "title" is not there anymore so everything is just the way it's supposed to be. Is this the normal x-cart behaviour (it shoudn't be) or I did something wrong? Any ideas what can cause this?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: duplicate title
No, it's not the default x-cart behaviour.
It appears your url-friendly mod is adding the additional title but neglects to replace the default title. I think the default titles coming from x-cart are the first titles you have printed, ie. "Sort by: Price" & "Page #2". What mod are you using to modify your URLs? XC-SEO?
__________________
Doms kube v4.1.9 |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: duplicate title
yes the 1st title is the default and actually is the one i want to have there. and yes it is XC-SEO. hm i should have look at the php files for this mode. any suggestions?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: duplicate title
Crumbs, it was a while since I done this. But the answer was provided by a kind fellow somewhere within the XC-SEO thread. Looks like this one by cbarnes http://forum.x-cart.com/showpost.php?p=196528&postcount=367
Go into modules/XC_SEO/outputfilter.seo.php and find the function _insert_href_title() right below it inside the function, find the line... if((strpos(" title=",$found)===false)){ and change to this... if((eregi("title=",$found)===false)){ Can't remember if the code needed changes .tpl-wise - I doubt it though. (Well except for the addition of the title tag which should take prominence outside of the XC-SEO mod) Remember to back up, just in case ;D Hope this helps. Regards, Doms
__________________
Doms kube v4.1.9 |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: duplicate title
I was looking at this php file cause you mention XC_SEO, found the fuction and I was playing with it without any success untill now. Thanks kube that worked out. Appreciated. But... well there is another problem now. Some of my links are like "Something somthing 15" something something" so now I get the error that the title closes after the "15" because of the ". How I correct this? How I tell this function in XC_SEO to ignore any " in title?
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: duplicate title
never mind fixed it. Kube thanks for the link. nice fix of XC_SEO.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#7
|
|||||||||
|
|||||||||
Re: duplicate title
Quote:
I don't think that it is good idea because any regular expressions works very slowly than strpos. Therefore more better solution is change strpos( ' title=', $found) to strpos($found, ' title=') crossposted in http://forum.x-cart.com/showthread.php?p=218937#post218937
__________________
Regards, Anthony Holub X-Cart Skins Store - twenty two different skins available; - both 4.1.x and 4.2.x versions compatible; - refresh you store now! Smart menu X-Cart add-on Featured Products Slide Show X-Cart add-on "What's New?" FREE X-Cart add-on |
|||||||||
|
|||
X-Cart forums © 2001-2020
|