Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

V 4.2 Speed Bar generated in reverse order

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-14-2009, 11:55 AM
 
sg_web sg_web is offline
 

Member
  
Join Date: May 2008
Posts: 29
 

Default V 4.2 Speed Bar generated in reverse order

I'm working on a store using v 4.2. I'm using the speed bar to create a static navigation for the site. For some reason, the list of pages/links gets generated in reverse order and I can't figure out how to correct it.

The code in my home.tpl file looks like this:
Code:
{if $speed_bar} <ul class="subnav"> {foreach from=$speed_bar item=sb} <li><a href="{$sb.link|amp}">{$sb.title}</a></li> {/foreach} </ul> {/if}

And it generates this:

Code:
<ul class="subnav"> <li><a href="pages.php?pageid=12">Contact Us</a></li> <li><a href="#">Order Tracking</a></li> <li><a href="#">Site Map</a></li> <li><a href="pages.php?pageid=11">Policies</a></li> <li><a href="pages.php?pageid=10">Shipping Info</a></li> <li><a href="pages.php?pageid=9">Links</a></li> <li><a href="http://petiteposh.wordpress.com/">Blog</a></li> <li><a href="pages.php?pageid=8">Articles</a></li> <li><a href="pages.php?pageid=7">Questions?</a></li> <li><a href="pages.php?pageid=6">About Us</a></li> <li><a href="home.php">Home</a></li> </ul>

In my x-cart admin, Home is Position 10, About Us is Position 20, Questions? is Position 30, etc.

Is there a setting in the Admin that I need to change to put the list in the right order?
__________________
X-Cart version 4.1.10 and 4.2 for client sites

Sandi Gauder
CMS Web Solutions Inc.
cmswebsolutions.com
Reply With Quote
  #2  
Old 04-15-2009, 12:49 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: V 4.2 Speed Bar generated in reverse order

it's feature(bug?) of 4.2
It's original skin uses float:right for tabs so they should be putted on the page in reverse order.
you can list tabs in reverse order in template:
Code:
{section loop=$speed_bar name=sb step=-1} <a href="{$speed_bar[sb].link|amp}">{$speed_bar[sb].title}</a> {/section}
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 04-15-2009, 03:33 AM
 
sg_web sg_web is offline
 

Member
  
Join Date: May 2008
Posts: 29
 

Default Re: V 4.2 Speed Bar generated in reverse order

That is an odd feature (?). Thanks Victor!
__________________
X-Cart version 4.1.10 and 4.2 for client sites

Sandi Gauder
CMS Web Solutions Inc.
cmswebsolutions.com
Reply With Quote
  #4  
Old 04-15-2009, 03:28 PM
 
2inchesofwater 2inchesofwater is offline
 

Member
  
Join Date: May 2007
Posts: 24
 

Default Re: V 4.2 Speed Bar generated in reverse order

I've got this problem happening too... the speed bar appears in reverse order on the store front, but in the ADMIN section, the speed bar appears in the correct (original) order! What's even stranger is that both the store front and the admin section both use the same customer/head.tpl code...

My pages don't use CSS float:right. We use CSS text-align:right, so that should remove the need for the speed bar items to be placed in reverse order.

Observation: It almost looks as though the speed bar items are being placed by code into $speed_bar in reverse order for the store front, but placed into $speed_bar in normal (original) order.
Is that correct? If so, that would suggest that $speed_bar is created in two separate locations in the code, and one has been altered to compensate for the CSS float:right instruction. Where can I find one (or both) of the $speed_bar definitions to fix it up?

Cheers,
Dan
__________________
xcartpro4.2
Reply With Quote
  #5  
Old 04-15-2009, 11:05 PM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: V 4.2 Speed Bar generated in reverse order

Customers header with speedbar is in the skin1/customer/head.tpl
Admins one is in skin1/head.tpl
change foreach cycle to section in template according to post #2
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:35 AM.

   

 
X-Cart forums © 2001-2020