Page 173 of 235 FirstFirst ... 73123163171172173174175183223 ... LastLast
Results 1,721 to 1,730 of 2345
  1. #1721

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

    Can I do this on the footer and have the options pop up? Or can I move the header down the page. I would like to have these links be on the bottom of the pages to match my existing website.

  2. #1722
    Join Date
    Dec 2008
    Posts
    36
    Plugin Contributions
    0

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

    Quote Originally Posted by timdwyer42 View Post

    Code:
    <?php
    class zen_categories_ul_generator {
        var $root_category_id = 0,
        $max_level = 0,
        $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, $parent_link='') {
          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 = $parent_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 * level1) . '<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, $category_link . '_');
                  }
                  $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);
        }
    }
    ?>

    The one thing about the code change is that the link to your subcats from the menu does not dispay the full category path. Just the final subcat and product id which means the normal categories sidebox menu doesn't open. I imagine the code could be changed to get it to open the full path but I havn't figured out how.
    I added few things to display the full path on sidebox menu.
    it seems to work fine to me but not sure if there is an invisable bug. use it for your own risk.

  3. #1723
    Join Date
    Dec 2008
    Posts
    158
    Plugin Contributions
    0

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

    doesn't work on my website...when I upload the tpl_header via ftp it stops working
    what's the matter?
    thanks
    www.alepia.ch Alepia suisse

  4. #1724
    Join Date
    Dec 2008
    Posts
    36
    Plugin Contributions
    0

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

    what should i change on the CSS if i want to center the text on the top level and shift all text to the left on all sublevel.

    Thanks in advance!

  5. #1725
    Join Date
    Dec 2009
    Posts
    204
    Plugin Contributions
    0

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

    Can some1 answer me this:
    i recently installed the css flyout menu 1.5 and the categories ul generator is being used now by a css click-show-hide sidebox from here:
    http://www.zen-cart.com/index.php?ma...roducts_id=872

    and now the categories are generated only in the sidebox and not the menu.how can i have them generate in both?

  6. #1726
    Join Date
    Jun 2005
    Posts
    39
    Plugin Contributions
    0

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

    Hi, I have a multiple language site and in one of my languages (dutch) i'd like to add a separate link in the dropdown menu.
    I've read in an earlier thread that I can add this line: <li><a href="link_here">Link Name Here</a></li>
    to my dropdown menu but how can i only show that link in that particular language and exclude it from all the others?
    Is there an exeption i can use or do i need to make somekind of language_stylesheet.css to exclude this link from all other languages?
    Your help would be greatly appreciated...

  7. #1727
    Join Date
    Dec 2009
    Posts
    1
    Plugin Contributions
    0

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

    Hi,

    I successfully implemented the menu and its been working great (i am using 1.3.8 fresh install). I was wondering if there is a way to call EZPAGES into the menu with menu options that generate automatically through the Chapter / TOC relationship.

    Read that this was done for 1.3.7, however how does it work in 1.3.8

    Thanks and regards,
    Sumit
    Last edited by sumitmalhotra; 22 Dec 2009 at 03:55 PM.

  8. #1728
    Join Date
    Jan 2009
    Location
    Vegas Baby!
    Posts
    332
    Plugin Contributions
    0

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

    I've read through this entire thread twice & I can't find a fix for my problem. I've got this installed on a test site. It works great but I have a huge space above the menu. I'm not sure what to edit in the stylesheet to fix this, I've tried a couple of things mentioned throughout the thread as possibilities but nothing seems to affect it. I don't know where the space is coming from, I have the menu on another site & it's not happening there.

    This is the test site

    I need the menu up higher to touch the bottom edge of the blue header.
    Completed: BellaFavori.com
    In Progress: WeddingDivasLV.com
    Coming Soon: ???

  9. #1729
    Join Date
    Jan 2009
    Location
    Vegas Baby!
    Posts
    332
    Plugin Contributions
    0

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

    Anyone got a clue at all? I've been messing with this for 2 days now, nothing I do seems to affect the vertical position
    Completed: BellaFavori.com
    In Progress: WeddingDivasLV.com
    Coming Soon: ???

  10. #1730
    Join Date
    Dec 2009
    Posts
    204
    Plugin Contributions
    0

    Default Css flyout menu 1.5 category ul generator

    Can some1 answer me this:
    i recently installed the css flyout menu 1.5 and the categories ul generator is being used now by a css click-show-hide sidebox from here:
    http://www.zen-cart.com/index.php?ma...roducts_id=872

    and now the categories are generated only in the sidebox and not the menu.how can i have them generate in both?

 

 

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