Zen Cart Logo
Forums / All Other Contributions/Addons / CSS Dropdown menu for the header- With Categories!

CSS Dropdown menu for the header- With Categories!

Views: 615,576

Results 1,561 to 1,580 of 2,344
21 Apr 2009, 10:19 PM
#1561
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

CSS Dropdown menu for the header- With Categories!

no didnt work, made it worse i think. i havent corrected it so you can see the result.

Thanks for your help.

23 Apr 2009, 1:24 AM
#1562
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

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

Hey so I LOVE this mod and have used it successfully before ... but my client has purchased a Zen template and I cannot for the life of me figure out where to put the code in tpl_header.php

I'm posting that template's tpl_header.php -- but am not sure it's as simple as that -- hoping that maybe possibly someone could please maybe possibly :blush: help me figure this out?

<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>
<?php

	
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>

<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="tail-left"></div>
<div class="main_t">
  <div class="header_t">
    <div class="row1">
      <div class="col1">
        <div class="indent">
        
        <table>
        <tr>
        <td style="vertical-align:middle; height:65px;">
        
							<?php # LANGUAGE START ?>
                                <?php 
                                if (!isset($lng) || (isset($lng) && !is_object($lng))) {
                                    $lng = new language;
                                  }
                                
                                  reset($lng->catalog_languages);
                                
                                  while (list($key, $value) = each($lng->catalog_languages)) {
                                    echo '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . zen_image(DIR_WS_LANGUAGES.$value['directory'].'/images/'.$value['image'], $value['name'], '', '', ' style="vertical-align:middle;"') . '</a>';
                                }
                                ?>
                            <?php # LANGUAGE END ?>
                            
         </td></tr></table>                   
          
        
        </div>
      </div>
      <div class="col2">
	  
	  <?php echo zen_draw_separator($image = 'pixel_trans.gif', '1', '23');?><br />
<?php echo zen_draw_form('currencies', zen_href_link(basename(ereg_replace('.php','', $PHP_SELF)), '', $request_type, false), 'get')?>
                                 
     <?php
                if (isset($currencies) && is_object($currencies)) {
            
                  reset($currencies->currencies);
                  $currencies_array = array();
                  while (list($key, $value) = each($currencies->currencies)) {
                    $currencies_array[] = array('id' => $key, 'text' => $value['title']);
                  }
            
                  $hidden_get_variables = '';
                  reset($_GET);
                  while (list($key, $value) = each($_GET)) {
                    if ( ($key != 'currency') && ($key != zen_session_name()) && ($key != 'x') && ($key != 'y') ) {
                      $hidden_get_variables .= zen_draw_hidden_field($key, $value);
                    }
                  }
                }
            ?>
            <?php echo zen_draw_pull_down_menu('currency', $currencies_array, $_SESSION['currency'], 'class="select" onchange="this.form.submit();"') . $hidden_get_variables . zen_hide_session_id()?>

</form>


      </div>
      <div class="col13"><?php echo zen_draw_separator($image = 'pixel_trans.gif', '1', '24');?><br />
      
      
        <?php 
            if ($_SESSION['cart']->count_contents() == 1) {
                $items = $_SESSION['cart']->count_contents() . ' item';
            } else {
                $items = $_SESSION['cart']->count_contents() . ' items';
            }
        
        ?>
      
      
      
        <b>Now in your cart: <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL');?>"><?php echo $items;?></a></b><br />
        
        
      </div>
      <div class="clear"></div>
    </div>
    <div class="row2">
      <div class="indent">
        <table style="width:auto;" align="left">
          <tr>
            <td><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.jpg'); ?></a><br />
            </td>
            <td>
            
            
                    <!-- bof BANNERS GROUPSET 2 -->
                    <?php
                      if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                        if ($banner->RecordCount() > 0) {
                    ?>
                        <div><?php echo zen_display_banner('static', $banner); ?></div>
                    <?php
                        }
                      }
                    ?>
                    <!-- eof BANNERS GROUPSET 2 -->
            
            
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <div class="menu_t menu">
    <div class="indent">
    
    
	<?php #HEADER START ?>
        <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
            <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
        <?php } ?>
    <?php #HEADER END ?>
       
       <div class="clear"></div>     
            
    </div>
  </div>
  <div class="content_t">
    <div class="inner">
      <div class="content_display">
        <div class="in1">
          <div class="in2">
            <div class="in3">
              <div class="in4">
                <div class="in5">
                
                
      


    
	
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
    
<?php } ?>
23 Apr 2009, 5:46 AM
#1563
determined1 avatar

determined1

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

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

hi,
i installed some language packs and they dont replace all the contents of the dropdown menu. what can i do?

23 Apr 2009, 10:50 AM
#1564
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

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

ally:

depends where you want it, i wanted the drop down right after where logo ends so i called the drop down under logo n navigation display:

  <!--eof-header logo and navigation display-->
  
      
<!--bof-drop down menu display-->
<?php require($template->get_template_dir('tpl_drop_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_drop_menu.php');?> <!--eof-drop down menu display-->
23 Apr 2009, 2:20 PM
#1565
lectronix avatar

lectronix

New Zenner

Join Date:
Jun 2008
Posts:
12
Plugin Contributions:
0

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

jettrue: I am fixing errors now to just use drop down and ignore clickhideshow for now. But if you find a solution please do let me know. THanks for all your help

23 Apr 2009, 4:20 PM
#1566
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

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

Lectronix:

ally:

depends where you want it, i wanted the drop down right after where logo ends so i called the drop down under logo n navigation display:

  <!--eof-header logo and navigation display-->

good point, I did fail to mention that.
However, I cannot find the END of the logo/navigation section -- it doesn't seem to be commented in the file.

And so far, wherever I try to place the menu code it wipes out the rest of the template.

I'm using this template
and want the menu just below the main header graphic where the template actually has their horizontal navigation (which is actually ez-pages navigation)

25 Apr 2009, 3:05 PM
#1567
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

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

aly22:

good point, I did fail to mention that.
However, I cannot find the END of the logo/navigation section -- it doesn't seem to be commented in the file.

And so far, wherever I try to place the menu code it wipes out the rest of the template.

I'm using this template
and want the menu just below the main header graphic where the template actually has their horizontal navigation (which is actually ez-pages navigation)
Make sure you have all the files uploaded in the correct spots for this mod. Check, double, triple, etc. check.

However, it looks like you're using a template monster template. I suspect you'll have tons of trouble getting ANY mod to work with your site. My advice is to use a new template, if you want to use my mod.

26 Apr 2009, 6:49 PM
#1568
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

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

I got it installed working, but now trying to get it to go exactly where I want it. Thanks!

1 May 2009, 9:13 PM
#1569
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

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

This is working great!! THANK YOU THANK YOU!!!

Question -- Is it possible to add ez-page links to other menu items? Or only under Information??? IOW, how can I add things manually to other top-level menus????

(my client has very specific requests and I do not know if I can oblige ....)

2 May 2009, 6:29 AM
#1570
catwing avatar

catwing

New Zenner

Join Date:
Mar 2009
Posts:
5
Plugin Contributions:
0

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

Hi Jetture,

CSS Dropdown menu for your header- With Categories!

After I upload all the file, my websie is be come like this.
http://www.asiahomecd.com/bctest/
actually any error did when upload?

Catwing

4 May 2009, 3:26 PM
#1571
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

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

aly22:

This is working great!! THANK YOU THANK YOU!!!

Question -- Is it possible to add ez-page links to other menu items? Or only under Information??? IOW, how can I add things manually to other top-level menus????

(my client has very specific requests and I do not know if I can oblige ....)

Hi!

You can mess around with includes/templates/YOUR_TEMPLATE/common/tpl_drop_menu.php. Pay careful attention on how the <ul> and <li> setup works. If you add a new main menu, you'll need to change the percentage in includes/templates/YOUR_TEMPLATE/css/stylesheet_header_menu.css

4 May 2009, 10:21 PM
#1572
eaddesigns avatar

eaddesigns

New Zenner

Join Date:
Oct 2007
Posts:
90
Plugin Contributions:
0

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

Not sure what happend but all the information, log in, contact us, etc is now under the products tab. Not sure how to fix this.
https://www.eaddesigns.com
version 1.38

4 May 2009, 10:35 PM
#1573
eaddesigns avatar

eaddesigns

New Zenner

Join Date:
Oct 2007
Posts:
90
Plugin Contributions:
0

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

i fixed it.:clap:

4 May 2009, 10:38 PM
#1574
tidy avatar

tidy

New Zenner

Join Date:
Apr 2009
Location:
Back in Toronto
Posts:
19
Plugin Contributions:
0

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

Hi Jade / All - I have searched this thread for help but could not find any solution.

Current Templet Cold Steel, Most recent ver of Zen - Developing local with Wamp.

The width of the drop down header is correct but only on the main page - When I use i.e 7 or Advant the correct width remains consistent when selecting the default links in your drop down header - However when using Firefox 3.0.9, Safari, or Opera the width changes on the other pages.

Any guidance would be most helpful. Thank You

Thomas

5 May 2009, 1:47 AM
#1575
tidy avatar

tidy

New Zenner

Join Date:
Apr 2009
Location:
Back in Toronto
Posts:
19
Plugin Contributions:
0

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

:yes: No worries - Had to use px instead of % - But I am unsure why the main page was the only page with the correct drop down header width - Cold Steel uses several background paper gifs and the d.d.h was extending past the background paper image on the other pages with FireFox, Opera, and Safari - I.E and Advant handled the d.d.h width correctly on the other pages.

Thanks for simplified addition, it goes well with a small presentation.

Thomas

14 May 2009, 12:08 PM
#1576
mejaflora avatar

mejaflora

New Zenner

Join Date:
Feb 2008
Posts:
21
Plugin Contributions:
0

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

I need help :( i spent hours trying to fix this, even uploaded the original files but nothing worked. It happened after I changed my header image which is the same size as before and rectified my header.php.

Now my Home is gone from top drop down menu and somehow if you hover over the first section where HOME is supposed to be only half of the area is highlighted. 2nd part is under My Account. Login from the drop down is gone and the space cut in half.

I have no clue what I did that have caused this.

Pls help!

14 May 2009, 3:17 PM
#1577
mejaflora avatar

mejaflora

New Zenner

Join Date:
Feb 2008
Posts:
21
Plugin Contributions:
0

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

mejaflora:

I need help :( i spent hours trying to fix this, even uploaded the original files but nothing worked. It happened after I changed my header image which is the same size as before and rectified my header.php.

Now my Home is gone from top drop down menu and somehow if you hover over the first section where HOME is supposed to be only half of the area is highlighted. 2nd part is under My Account. Login from the drop down is gone and the space cut in half.

I have no clue what I did that have caused this.

Pls help!

oh my god!!! I solved it!!! woohoo!

it was the header.php in languages/english/my template.

define('HEADER_TITLE_CATALOG', 'Home');
define('HEADER_TITLE_LOGOFF', 'Log Off');
define('HEADER_TITLE_LOGIN', 'Log In');

The home, log off and log in was missing :D do the dance of joy

21 May 2009, 2:07 AM
#1578
rvagrrl avatar

rvagrrl

New Zenner

Join Date:
Oct 2005
Posts:
90
Plugin Contributions:
0

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

sigh I'm apparently doing something silly because the menu is line wrapping in IE6 and IE7, though not in IE8 or a decent browser. I've tried adjusting the percentages (currently 8 links across with 12.4% set), but it doesn't change anything. Even if I change it to something crazy small, like 3%. I've also tried adjusting the 12em (currently set to 15em to accommodate long subcat names), but even bumping everything down to a low number, like 3em, it's still wrapping. What's going on that I'm missing??

http://rossomer.lbdclients.com

Please ignore the crazy box of text that's insisting on displaying to the far right in IE6/7. That's my next fix.

Thanks!

22 May 2009, 1:57 PM
#1579
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

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

rvagrrl:

sigh I'm apparently doing something silly because the menu is line wrapping in IE6 and IE7, though not in IE8 or a decent browser. I've tried adjusting the percentages (currently 8 links across with 12.4% set), but it doesn't change anything. Even if I change it to something crazy small, like 3%. I've also tried adjusting the 12em (currently set to 15em to accommodate long subcat names), but even bumping everything down to a low number, like 3em, it's still wrapping. What's going on that I'm missing??

http://rossomer.lbdclients.com

Please ignore the crazy box of text that's insisting on displaying to the far right in IE6/7. That's my next fix.

Thanks!
Also change this one to 12.4% in stylesheet_header_menu.css

*width:16.649%;

That one is for IE.

22 May 2009, 2:10 PM
#1580
rvagrrl avatar

rvagrrl

New Zenner

Join Date:
Oct 2005
Posts:
90
Plugin Contributions:
0

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

Thanks so much! Don't know how I missed that. =)