Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Split Category box

    Hi!

    I try to split the category view into two separate boxes.
    Lets say this is my Category Box:

    - Category 1
    - Subcat 1
    - Subcat 2
    - Subcat 3
    - Category 2
    - Subcat 1
    - Subcat 2
    - Subcat 3
    - Category 3
    - Subcat 1
    - Subcat 2
    - Subcat 3

    I want a category box on top on the page with Category 1, 2, 3.
    When users navigate to Category 1, the specific subcat's should appear in the left navigation box.

    Could someone push me in the right direction? :)

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Split Category box

    category box on top on the page
    Do you mean horizontally at the base of the header, or in an actual box in the left or right column? The categories-tabs header navigation will show your top categories, and you can use Categories Dressing with its settings to not show top cats in the sidebox.

  3. #3
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Split Category box

    Quote Originally Posted by gjh42 View Post
    Do you mean horizontally at the base of the header, or in an actual box in the left or right column? The categories-tabs header navigation will show your top categories, and you can use Categories Dressing with its settings to not show top cats in the sidebox.
    Yes, I have a navigation bar at the top.
    The top-level categories should appear in a list below the navigation bar.

    The sub-categories should be displayed in a category-sidebox on the left side.

    I have tried the following in my /includes/templates/mytemplate/common/tpl_header.php:

    (the remaining task is to hide the top-level categories from the category-sidebox)

    Code:
    <div class="main_categories" style="">
    	<ul>
    <?php 
    	$main_category_tree = new category_tree;
        $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 and parent_id = 0 limit 1");
        if ($check_categories->RecordCount() > 0) {
          $box_categories_array = $main_category_tree->zen_category_tree();
        }
        //echo '<pre>';
        //print_r($box_categories_array);
        foreach($box_categories_array as $cat) {
        	if($cat['top'] == 'true') {
        		echo '<li><a href="'.zen_href_link(FILENAME_DEFAULT, $cat['path']).'"'.($cat['current'] ? ' class="active"' : '').'>'.$cat['name'].'</a></li>';
        	}
        }
    ?>
    	</ul>
    </div>

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Split Category box

    I don't understand why you felt it necessary to reinvent the categories-tabs function when it is already in the stock header. If you wanted the top categories to look like a list, you could do it with CSS on cat-tabs elements.

    Seeing your site would help us to advise you on what to do.
    (the remaining task is to hide the top-level categories from the category-sidebox)
    Categories Dressing has a setting to do this. Alternatively, you could probably add to your stylesheet

    #categories .category-top {display: none;}

  5. #5
    Join Date
    Oct 2010
    Posts
    6
    Plugin Contributions
    0

    Default Re: Split Category box

    Quote Originally Posted by gjh42 View Post
    I don't understand why you felt it necessary to reinvent the categories-tabs function when it is already in the stock header. If you wanted the top categories to look like a list, you could do it with CSS on cat-tabs elements.

    Seeing your site would help us to advise you on what to do.
    Categories Dressing has a setting to do this. Alternatively, you could probably add to your stylesheet

    #categories .category-top {display: none;}
    I see it is a bit rubbish... But I couldn't find the right way to do it from the start. I've got it to work now, thanks for your help!

 

 

Similar Threads

  1. Implementing a split-box cost
    By lyingit in forum General Questions
    Replies: 6
    Last Post: 2 Dec 2011, 09:41 AM
  2. Split Categories Box - what does it do?
    By kdays in forum General Questions
    Replies: 2
    Last Post: 9 Sep 2009, 10:26 AM
  3. Split box categories by products or manufacturers
    By ryska in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Dec 2007, 02:59 PM
  4. split multiple box
    By 100asa in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Nov 2007, 08:27 PM
  5. Split Box Behavior
    By Butta in forum Addon Shipping Modules
    Replies: 0
    Last Post: 8 Jul 2006, 06:40 PM

Posting Permissions

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