| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How Can I do this. . . | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Let's say I have a Category, with X number of subcategories. . .
I'd like to lay them out in 4 columns, instead of reading left to right though, I'd like to lay them out in 4 columns, top to bottom. . Let me see if i can explain that better. . . . I'd like to count the number of subcategories, then divide by the number of columns. So, if there are 100 subcategories, and I want them in 4 columns. . 100/4 = 25 in each column <ul> then 25 <li>subcat</li>'s </ul> <ul> then 25 more <li>subcat</li>'s </ul> <ul> then 25 more <li>subcat</li>'s </ul> <ul> then 25 more <li>subcat</li>'s </ul> Any ideas how I can do this? Thanks! Lyn
__________________
Lyn Askin X-Cart 4.2.3 MICR Toner Toner Cartridges X-Cart Search Engine Optimization |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() They only solution I can give is to create your categories and then manually code it to show your own css driven style categories (Exactly as you want it) I don't think this would be possible with x-carts css, and code...
Maybe there is some one with better knowledge than me though that can help.
__________________
Thank You - Alan Don't be like me, and keep saying "Nearly did it" go do it!! Version: 4.4.4 Gold - |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() You should be able to do it using smarty or php.
In smarty: Your subcategories are in this array: $subcategories number of items in the array: {$subcategories|@count} You can set smarty variables to determine the subcats per column: {assign var="subcats_count" value=$subcategories|@count} {assign var="subcats_per_section" value=$subcats_count/4} You can create loops in smarty using the variables to get the desired outcome. You can set a variable inside your loop to count where you are, and when you reach the desired subcategory count, you can start a new unordered list.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|