Results 1 to 6 of 6

Main categories on Horizontal menu, specific sub-cat on left column

This is a discussion on Main categories on Horizontal menu, specific sub-cat on left column within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I have been searching this forum and trial and error for a few attempts but bear no fruit so far! ...

      
  1. #1
    Member
    Join Date
    Dec 2008
    Posts
    40
    Rep Power
    0


    Default Main categories on Horizontal menu, specific sub-cat on left column

    I have been searching this forum and trial and error for a few attempts but bear no fruit so far!

    I have set my main categories (A,B,C,D,E) as horizontal menu on top half of the page. Have done this no problem. The next bit is where I need help.

    When I click on say for example category A, I would like ONLY sub-cat of A be shown on left column. i.e. showing ONLY sub-cat A1, A2, A3,A4. And when I then click D on horizontal menu, ONLY sub-cat D1,D2,D3 shown on left column.


    Please can someone advise how can i do this?

    See this website for example

    http://www.johnlewis.com/Technology/Area.aspx
    Last edited by ASTON; 03-12-2009 at 03:18 PM.

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Thumbs up Re: Main categories on Horizontal menu, specific sub-cat on left column

    Try this - I have not done it yet - but think I will - let me know if it works for you.

    Link to eBook extract

    Hope this helps

    pgmarshall

  3. #3
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Default Re: Main categories on Horizontal menu, specific sub-cat on left column

    Or this ... from this board!

    Hide Parent Category and Display only Child or Sub Category in a DHTML menu

    regards,

    pgmarshall

  4. #4
    Member
    Join Date
    Dec 2008
    Posts
    40
    Rep Power
    0


    Default Re: Main categories on Horizontal menu, specific sub-cat on left column

    Hi pgmarshall,

    Thanks for the pointers, much appreciated! …. I looked at this ‘Hide Parent Category and Display only Child or Sub Category in a DHTML menu’ before, it is for dhtml…. extract some info from it to make mod to categories.php, but wasn;t running properly. I’ll have a look at the ebook extract later today.

    If any one has any idea on this pls drop in.

    Cheers

  5. #5
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Lightbulb Re: Main categories on Horizontal menu, specific sub-cat on left column

    ASTON,

    I have been trying to fix my menu structure and as such have thought of a way that you could get what you are looking for.

    If you use the default menu code (the text based one) - look at categories.php in boxes.

    I have editted and set a new varaible $catlevel = 0

    Code:
    for ($i=0; $i<$tree[$counter]['level']; $i++) {
    $boxContent .= "&nbsp;&nbsp;";
    }
    to

    Code:
    for ($i=0; $i<$tree[$counter]['level']; $i++) {
    $boxContent .= "&nbsp;&nbsp;";
    $catlevel .= $catlevel + 1;
    }
    Which gives me a variable to control the class of each of the different levels - I have wrapped the <a href inside a <tr> and then created a class in the stylesheet.css to correspond to the levels.

    I thought you could use this to put some conditional code into your menu structure eg.

    if $catlevel = 0 (ie. top level) then put a ' ' instead of the <a href lines and set the <tr> height = 0 in the css for TR.0 level
    I think this would have the effect of hiding your top category but still displaying the children and maintaining the functionality of the menu.

    Hope this helps,

    pgmarshall

  6. #6
    Lurker
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0


    Default Re: Main categories on Horizontal menu, specific sub-cat on left column

    Hi Guys,

    I followed the ebook's instruction with little success.

    The parent category still shows up, just without links.

    Anyone know how to get the parent category completely hidden?

    I think the code

    Code:
      if (isset($cPath) && tep_not_null($cPath) && tep_has_category_subcategories($cPath)){
    is no functional.

    Thanks,
    William

Similar Threads

  1. Display Horizontal Categories
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-03-2007, 08:14 AM
  2. horizontal CSS menu
    By theengineer in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 07-21-2007, 11:41 AM
  3. Double categories box in left column
    By battleaxe in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 10-09-2006, 09:17 AM
  4. Create multple mainpages avail from horizontal dropdown menu
    By fuzzyphil in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 12-23-2005, 09:38 PM
  5. Move all in rh column to left and remove RH column
    By jloyzaga in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 03-24-2004, 04:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •