Forums / Templates, Stylesheets, Page Layout / Category Tabs - Create nested list of Cats & Subcats

Category Tabs - Create nested list of Cats & Subcats

Locked

Views: 3,256

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
12 May 2009, 11:38 PM
#1
evamike avatar

evamike

New Zenner

Join Date:
May 2009
Posts:
2
Plugin Contributions:
0

Category Tabs - Create nested list of Cats & Subcats

HI,

I am struggling to find a clear answer as to how I could generate a nested list of categories and subcategories for use in the Category Tabs. Basically all I need is a list in the form:

<ul>
   <li>Category Link
       <ul>
           <li>Subcategory Link</li>
           <li>Subcategory Link</li>
       </ul>
   </li>
   <li>Category Link
       <ul>
           <li>Subcategory Link</li>
           <li>Subcategory Link</li>
       </ul>
   </li>
</ul>

I have links other than top level Categories that I want to appear there so I have been working with the tpl_modules_categories_tabs.php file. $links_list is a list of the top level categories but I need also a subcategory list for each top level category.

I am not a seasoned php coder so I'm a bit lost and appreciate that I could be over or under complicating things. I have searched the forums but haven't found any answers at my level. I looked at CSS Horizontal Drop Down Menu but it just seems to make a dropdown of the whole Categories list which is not quite what I'm trying to do. Is there a simple answer to this problem?

Thanks

Mike

13 May 2009, 3:03 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category Tabs - Create nested list of Cats & Subcats

If you want the nested subcat lists like you show, you will need something like the categories CSS dropdown generator to get it. You can strip the dropdown part of the code/CSS and style the lists as you wish.

13 May 2009, 10:02 PM
#3
evamike avatar

evamike

New Zenner

Join Date:
May 2009
Posts:
2
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

Thanks for your response. I managed to fix it by borrowing the class file fry CSS Flyout menu to generate my list. Then I inserted the extra li tags for my custom links before printing it all out. The code my not look pretty and certainly won't win me any awards but the result is bang on. Thanks for your help.

Long live the Open Source Community!!

Mike

26 Aug 2009, 2:15 PM
#4
websightdesign avatar

websightdesign

New Zenner

Join Date:
Mar 2006
Posts:
72
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

Hi Mike

I am currently trying to re-design the horizontal menu to look like littlewoods.com is that what you managed to do if so can you let me have a little more informatin on how you managed it.

Thanks
Brad

26 Aug 2009, 3:55 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category Tabs - Create nested list of Cats & Subcats

What you are looking for is just a variation on a CSS dropdown menu, available from Free Addons. Your reference shows the entire subcat list for a top cat in one box, but that should be achievable by tweaking the dropdown structure.

26 Aug 2009, 9:54 PM
#6
websightdesign avatar

websightdesign

New Zenner

Join Date:
Mar 2006
Posts:
72
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

Hi

Thanks for your reply, as you suggested i have tried looking at the coding for the generator to tweak this code as i thought this might hold the key but i am a little lost. i currently have modified the flyout horizontal menu to show the top level of categories as the main links rather than teh contact us and my account etc... i would now like the flyout menu's that come down from them top level of categories to show one level down in larger text and then the following sub categories as shown on the littlewoods.com website.

Any help would be much appreciated, or some direction as to where i should be looking if i'm in the wrong place.

Thanks
Brad

26 Aug 2009, 10:02 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category Tabs - Create nested list of Cats & Subcats

There is more than one CSS menu mod - be sure you have the one that already handles categories. That will have the code for you to tweak. One that doesn't handle categories will require you to start from scratch.

26 Aug 2009, 10:10 PM
#8
websightdesign avatar

websightdesign

New Zenner

Join Date:
Mar 2006
Posts:
72
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

I've tried installing the following two version are these the ones that you were talking about

CSS Flyout Menu
Last Updated by: Get Em Fast May 28 2009 v1.3.8 1.3.8

CSS Horizontal Drop Down Menu
Last Updated by: Jade True - SageFish.com Jan 18 2008 v1.3.8 1.5

i've currently got the css flyout menu version 1.3.8 installed but this seems to be a sidebox rather than a horizontal menu, and i've also installed the second one which is the one that i have changed the code for showing top level categories on the header menu.

Thanks
Brad

26 Aug 2009, 10:21 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Category Tabs - Create nested list of Cats & Subcats

CSS Horizontal Drop Down Menu
Version: 1.5
Last Updated: Jan 18 2008
Author: Jade True - SageFish.com
This add-on will allow you to have a horizontal css based flyout menu for your zen cart header. It also displays your categories dynamically,

This should be the one to use. I haven't looked at it so can't advise on modifying it. Ask in the support thread for the mod.

27 Aug 2009, 6:37 AM
#10
websightdesign avatar

websightdesign

New Zenner

Join Date:
Mar 2006
Posts:
72
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

Thanks for help glenn i'll try the support thread for this mod.

Thanks
Brad

27 Aug 2009, 9:35 PM
#11
websightdesign avatar

websightdesign

New Zenner

Join Date:
Mar 2006
Posts:
72
Plugin Contributions:
0

Re: Category Tabs - Create nested list of Cats & Subcats

Hi Glenn

Thanks for the help with this problem i have managed to modify just the stylesheet to make the arrangements that i needed for the menu but i would like to know whether it is possible to keep the flyout menu inside the window as when i go over the end category as the menu is set to a static size it goes further to the rght than the website should do and it needs to be scrolled right to see all of the menu.

Is there a position command for stylesheets that you can think of that will keep it inside the window?

Thanks
Brad