Page 193 of 235 FirstFirst ... 93143183191192193194195203 ... LastLast
Results 1,921 to 1,930 of 2345
  1. #1921
    Join Date
    Mar 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Quote Originally Posted by gmerdan View Post
    I've tried to search the 200 pages of this thread with no luck.

    Instead if displaying "Home, Categories, Information, Contact us, etc" in the horizontal bar. Is it possible to replace these with main categories and the drop down shows sub-categories? Dynamically loading the categories and sub-categories, not adding in manually.

    It would look like:
    Category 1 | Category 2 | Category 3
    |>subcat
    |>subcat


    Hopefully, a someone can help answer this, and Ive tried include keywords to help others who are trying to search the same thing.
    Replace header css flyout with categories and sub categories
    Thanks in advance!
    Whew...found an answer on page 172.


    Replace categories_ul_generator.php with:
    Had to modify it for my purpose, but this solved my first question. THANKS GUYS!
    Code:
    <?php
    class zen_categories_ul_generator {
        var $root_category_id = 0,
        $max_level = 6,
        $data = array(),
        $root_start_string = '',
        $root_end_string = '',
        $parent_start_string = '',
        $parent_end_string = '',
    
        $parent_group_start_string = '<ul%s>',
        $parent_group_end_string = '</ul>',
    
        $child_start_string = '<li%s>',
        $child_end_string = '</li>',
    
        $spacer_string = '
        ',
        $spacer_multiplier = 1;
    
        var $document_types_list = ' (3) ';// acceptable format example: ' (3, 4, 9, 22, 18) '
    
        function zen_categories_ul_generator($load_from_database = true)
        {
            global $languages_id, $db;
            $this->data = array();
            $categories_query = "select c.categories_id, cd.categories_name, c.parent_id
                                 from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                                 where c.categories_id = cd.categories_id
                                 and c.categories_status=1 " .
                                 " and cd.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                                 " order by c.parent_id, c.sort_order, cd.categories_name";
            $categories = $db->Execute($categories_query);
            while (!$categories->EOF) {
              $this->data[$categories->fields['parent_id']][$categories->fields['categories_id']] = array('name' => $categories->fields['categories_name'], 'count' => 0);
                $categories->MoveNext();
            }
        }
    
        function buildBranch($parent_id, $level = 1, $submenu=false) {
          if ($parent_id != '0') {
            $result = sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level) . '"' : '' );
          }
            if (($this->data[$parent_id])) {
                foreach($this->data[$parent_id] as $category_id => $category) {
                  $category_link = $category_id;
                  if (($this->data[$category_id])) {
                    $result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
                  } else {
                    if (($this->data[$category_id]) && ($submenu==false)) {
                      $result .= sprintf($this->parent_group_start_string, ($submenu==true) ? ' class="level'. ($level+1) . '"' : '');
                      $result .= sprintf($this->child_start_string, ($submenu==true) ? ' class="submenu"' : '');
                    } else {
                      $result .= sprintf($this->child_start_string, '');
                    }
                  }
                  if ($level == 0) {
                    $result .= $this->root_start_string;
                  }
                  $result .= str_repeat($this->spacer_string, $this->spacer_multiplier * $level) . '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link) . '">';
                  $result .= $category['name'];
                  $result .= '</a>';
                  if ($level == 0) {
                    $result .= $this->root_end_string;
                  }
                  if (($this->data[$category_id])) {
                    $result .= $this->parent_end_string;
                  }
                  if (($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1))) {
                    $result .= $this->buildBranch($category_id, $level+1, $submenu);
                  }
                  $result .= $this->child_end_string;
                }
            }
            if ($level > 0) {
              $result .= $this->parent_group_end_string;
            }
            return $result;
        }
    
        function buildTree($submenu=false)
        {
            return $this->buildBranch($this->root_category_id, '', $submenu);
        }
    }
    ?>

  2. #1922
    Join Date
    Mar 2010
    Posts
    15
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Another question,

    Is it possible to have all subcategories show up in 3 columns?

    Example:
    Category 1 | Category 2 | Category 3
    ------------------------------------------------------------
    |>Cat1Sub1 |>Cat1Sub5 |>Cat1Sub9
    |>Cat1Sub2 |>Cat1Sub6 |>Cat1Sub10
    |>Cat1Sub3 |>Cat1Sub7 |>Cat1Sub11
    |>Cat1Sub4 |>Cat1Sub8 |>Cat1Sub12

  3. #1923
    Join Date
    Aug 2008
    Posts
    244
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Quote Originally Posted by gmerdan View Post
    Another question,

    Is it possible to have all subcategories show up in 3 columns?

    Example:
    Category 1 | Category 2 | Category 3
    ------------------------------------------------------------
    |>Cat1Sub1 |>Cat1Sub5 |>Cat1Sub9
    |>Cat1Sub2 |>Cat1Sub6 |>Cat1Sub10
    |>Cat1Sub3 |>Cat1Sub7 |>Cat1Sub11
    |>Cat1Sub4 |>Cat1Sub8 |>Cat1Sub12
    You can do that the way i did mine. A little css and product tweaking.

    Example

    Just go into the header menu, top right and let me know if thats what you mean.

  4. #1924
    Join Date
    Nov 2007
    Posts
    555
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Hi,

    Please can someone help...the drop down menu is not working correctly in IE7... see here

    As you will be able to see in IE 7(works fine in firefox) the drop down menus are not right. When you roll over the first link the first drop down doesn't fall below the horizontal links but on top and then the same things happens with the other drop down boxes, they cover the top links.

    How can we correct this? Any help would be great...

    Thanks
    Last edited by pb4; 28 Sep 2010 at 11:46 AM.

  5. #1925
    Join Date
    Aug 2008
    Posts
    244
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Quote Originally Posted by pb4 View Post
    Hi,

    Please can someone help...the drop down menu is not working correctly in IE7... see here

    As you will be able to see in IE 7(works fine in firefox) the drop down menus are not right. When you roll over the first link the first drop down doesn't fall below the horizontal links but on top and then the same things happens with the other drop down boxes, they cover the top links.

    How can we correct this? Any help would be great...

    Thanks
    You'll need to find the correct 'top' command for that menu, but i'm pretty sure its:

    div#dropMenu ul.level2

    and add:

    div#dropMenu ul.level2 {
    top:25px;
    }

    and adjust the 'px' to suit.

  6. #1926
    Join Date
    Nov 2007
    Posts
    555
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Quote Originally Posted by first trading View Post
    You'll need to find the correct 'top' command for that menu, but i'm pretty sure its:

    div#dropMenu ul.level2

    and add:

    div#dropMenu ul.level2 {
    top:25px;
    }

    and adjust the 'px' to suit.
    Thank you...that has sorted that issue

  7. #1927
    Join Date
    Nov 2008
    Location
    Ontario, Canada
    Posts
    72
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Just a couple of questions..
    Here's the site Im currently working on http://redscarfunion.ca/store/

    1. If I want to hit the "home" button I end up getting the dropdown menu instead and a little box to the right which is the link to the home button.
    Is there a way to ensure the dropdown menus dont overlap the main menu buttons?
    2. I am now faced with the zen cart logo being back.. where do I change this.. I cannot figure it out..
    3. I had at one point my sidebox (wide) with my ssl, paypal, facebook and twitter icons.. now when I do them the are outside of the white area..instead of inside

    Hoping what I've asked makes sense

  8. #1928
    Join Date
    Aug 2008
    Posts
    244
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Everything looks perfect to me, have you sorted this out...?

  9. #1929
    Join Date
    Nov 2008
    Location
    Ontario, Canada
    Posts
    72
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    No its not sorted..
    I've included an image for you to look at ..
    When I installed this menu..it bumped out my header and icons..


  10. #1930
    Join Date
    Aug 2008
    Posts
    244
    Plugin Contributions
    0

    Default Re: CSS Dropdown menu for the header- With Categories!

    Quote Originally Posted by JuzJoJo View Post
    No its not sorted..
    I've included an image for you to look at ..
    When I installed this menu..it bumped out my header and icons..

    Post #1925, this answers your question and fixes the problem you are having.

 

 

Similar Threads

  1. Categories dropdown menu/css
    By KenshiroU in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Apr 2013, 01:04 PM
  2. HIde categories mod with css dropdown menu
    By adowty in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 9 Feb 2012, 01:05 AM
  3. How to use ezpages/categories as dropdown menu in the header?
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Dec 2011, 06:32 PM
  4. whats wrong with this css for my dropdown menu?
    By 1kell in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 28 May 2010, 02:47 AM
  5. Header Dropdown Menu (CSS) Without the Dropdown???
    By hcd888 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 May 2009, 01:20 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR