Results 1 to 10 of 2344

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

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

    Quote Originally Posted by GraniteMan44 View Post
    I downloaded and installed the files from this link----

    I just downloaded it and reinstalled everything and the problem still exists. I took out the (margin: 8em) from the logoWrapper so that you can see that the image in the header isn't displaying because the header is collapsing.
    I guess I'm confused how your logo display issues would be related to this menu??? Can you clarify why you believe this is true???
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Dec 2007
    Location
    Michigan
    Posts
    160
    Plugin Contributions
    0

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

    Because everything lined up prior to installing the mod.

  3. #3
    Join Date
    Dec 2007
    Location
    Michigan
    Posts
    160
    Plugin Contributions
    0

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

    Would it make it easier for you if I uninstalled everything so you could view the site before....and then reinstall again so you can see the after again?

  4. #4
    Join Date
    Dec 2007
    Location
    Michigan
    Posts
    160
    Plugin Contributions
    0

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

    The problem is with the tpl_header.php. According to the instructions that came with the mod I simply inserted the <!--bof drop down menu display--> Into my existing tpl_header.php. file. When I do that, the header disappears. That is why I inserted the code from the tpl_header.php file so that one could look it over to see what the problem is.

  5. #5
    Join Date
    Dec 2007
    Location
    Michigan
    Posts
    160
    Plugin Contributions
    0

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

    Here is a screen shot of the dowloaded file to show that this is the correct mod thread.
    Click image for larger version. 

Name:	css_horizontal_drop_down_menu_1-5.jpg 
Views:	175 
Size:	27.8 KB 
ID:	8748

  6. #6
    Join Date
    Dec 2007
    Location
    Michigan
    Posts
    160
    Plugin Contributions
    0

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

    Does it matter where the drop down menu code goes in the tpl_header.php file? Is there a specific order that they have to be presented? The reason I ask this is because...AFTER installing this mod the header disappeared and the only way to get it to show up is to either add a margin to the logowrapper or add padding to the top of headerWrapper. When I add the margin in the logowrapper, the header doesn't line up properly in the browsers. When I add padding to the top of the headerWrapper, the "HOME LOG IN" bar drops below the headerwrapper. I am considering not using this mod, but I really want to because it looks and functions great....it just messes up the headerWrapper. Can anyone look at this and offer a solution?

  7. #7
    Join Date
    Feb 2011
    Posts
    1
    Plugin Contributions
    0

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

    Hi,
    I am looking to display my 6 categories as individual drop downs horizontally across the top, each one would then have sub categories and sub sub categories.
    Is this possible with this contribution

    Many thanks

    David

  8. #8
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

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

    Quote Originally Posted by pompeydave View Post
    Hi,
    I am looking to display my 6 categories as individual drop downs horizontally across the top, each one would then have sub categories and sub sub categories.
    Is this possible with this contribution

    Many thanks

    David
    Try the category tabs dropdown menu..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  9. #9
    Join Date
    Dec 2006
    Location
    Seligman, MO U.S.A.
    Posts
    2,101
    Plugin Contributions
    5

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

    Quote Originally Posted by pompeydave View Post
    Hi,
    I am looking to display my 6 categories as individual drop downs horizontally across the top, each one would then have sub categories and sub sub categories.
    Is this possible with this contribution

    Many thanks

    David
    Actually, it can be done very nicely with this menu. I just done one using this and it works great. Just replace your categories_ul_generator.php code with this code, and your Top Categories will be shown, then your subs will drop down.

    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);
        }
    }
    ?>
    Teach them to shop and they will shop today;
    Teach them to Zen and they will OWN a shop tomorrow!

 

 

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

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