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

Alphabetical Dropdown Menu

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-18-2009, 05:26 AM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default Alphabetical Dropdown Menu

This one is simple to explain, not sure if it's simple to fix.

CSS
Code:
#all_products { width:400px; } .category_link { position:relative; float:left; width:200px;

PHP
Code:
<a href="#" class="all_products" onmouseover="document.getElementById('all_products').style.display='block';" onmouseout="document.getElementById('all_products').style.display='none';"><span>All Products&nbsp;</span></a> {foreach from=$topmenu_items key=toppos item=topcat} {if $topcat.id ne 0} <a id="topmenutab{$topcat.id}" href="home.php?cat={$topcat.id}" onmouseover="showTopMenu({$topcat.id})" onmouseout="hideTopMenu({$topcat.id})"><span>{$topcat.name}&nbsp;</span></a> {/if} {/foreach}

DER GIVENS
What we have here is a Navigation Menu, you mouse over it, it drops down a menu.

What happens is it loads each category as a Link Text. CSS says that each Link Text is 200px wide.

SO.

If the CSS says the entire block is 400px wide. Then it has two Link Texts and then moves to the next line.

It looks like there are two columns. No one can tell.

IE if the CSS says the entire block is 600px wide, then it has three Link Texts and then moves to the next line.

DER PROBLEM
My boss wants it to go alphabetical straight down for each column.

Unfortunately, if I remove the width, it just goes straight down. If I limit the height in CSS then it goes and stops at the height and doesn't create a new line.

He doesn't want to rearrange the categories so that they come out alphabetical.

Yeah I know the problem is pretty laughable.

What I need I guess is a way to "Continue" a Column after the first one.
Or
Is there a way to load a certain number in the array (foreach) to be 1 - 10 and then load them in separate columns. So if there were 24 link texts, I could load 1 - 10 in one and 11 - 20 in another and 21 - 24 in the last one.

I'm open to suggestion
__________________
Moo?
Quality Door & Hardware

Version
X-Cart 4.1.108

Add-ons
X-AOM (Advanced Order Management)
Ad / Banner X-cart Mod (BCSE)
DSEFU
Dynamic Image Mod
Pre-login Shipping Calculator
Power Filter
Contact Us Form
Shipping Carrier Mod
Submit Button

Send me a message, I can talk about anything.
Reply With Quote
  #2  
Old 09-21-2009, 05:05 AM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default Re: Alphabetical Dropdown Menu

Bump a day
__________________
Moo?
Quality Door & Hardware

Version
X-Cart 4.1.108

Add-ons
X-AOM (Advanced Order Management)
Ad / Banner X-cart Mod (BCSE)
DSEFU
Dynamic Image Mod
Pre-login Shipping Calculator
Power Filter
Contact Us Form
Shipping Carrier Mod
Submit Button

Send me a message, I can talk about anything.
Reply With Quote
  #3  
Old 09-28-2009, 05:17 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Alphabetical Dropdown Menu

Der Solution
Get a new boss.

I guess you could "total all the categories" then divide by the "number of columns" and then use a "loop the number of columns" and display each category that way, but it would be some really involved code.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following user thanks JWait for this useful post:
cowsdonthack (09-28-2009)
  #4  
Old 09-28-2009, 05:27 AM
  cowsdonthack's Avatar 
cowsdonthack cowsdonthack is offline
 

Advanced Member
  
Join Date: May 2009
Location: Out in the field. Chewin some grass
Posts: 89
 

Default Re: Alphabetical Dropdown Menu

Quote:
Originally Posted by JWait
Der Solution
Get a new boss.

jWait,

IT WORKED! Thanks a lot, this also fixed over 9000 other problems that I was having with the site

Thank you very much! xD
__________________
Moo?
Quality Door & Hardware

Version
X-Cart 4.1.108

Add-ons
X-AOM (Advanced Order Management)
Ad / Banner X-cart Mod (BCSE)
DSEFU
Dynamic Image Mod
Pre-login Shipping Calculator
Power Filter
Contact Us Form
Shipping Carrier Mod
Submit Button

Send me a message, I can talk about anything.
Reply With Quote
  #5  
Old 09-28-2009, 07:01 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Alphabetical Dropdown Menu

http://forum.x-cart.com/showthread.php?t=26561
__________________
xcartmods.co.uk
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 12:07 AM.

   

 
X-Cart forums © 2001-2020