Okay, I am partly answering my own question....I put this code in:
<li><a href="http://www.mywebsite.com/catalog/index.php?main_page=page_3">Events</a></li>
However, the font is not right. How to fix that?
Okay, I am partly answering my own question....I put this code in:
<li><a href="http://www.mywebsite.com/catalog/index.php?main_page=page_3">Events</a></li>
However, the font is not right. How to fix that?
I'm using this template and I added the hide categories module. While it works in the categories sidebox, the "hidden" category still shows up in the drop down menu at the top of the page. Is there a workaround for this?
![]()
Do you want to use both sidebox category list and mega_menu dropdown? If not, and if you want to use the dropdown, the simplest way would be to hard code your categories in mega_menu as a list. There may be some nice php to bring about the same effect, but I haven't seen it...
Thank you for the speedy response! It does seem rather redundant to have the sidebox categories and the nav bar categories. How would I go about hard coding the categories in mega_menu as a list?
In tpl_mega_menu.php, find
<li class="submenu categories-li" <?php if (MENU_CATEGORIES == 'false') echo "style=\"display:none; \""; ?> ><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo HEADER_TITLE_CATEGORIES; ?></a><!-- bof cateories -->
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<div class="levels">
<?php
// load the UL-generator class and produce the menu list dynamically from there
require_once (DIR_WS_CLASSES . 'categories_ul_generator.php');
$zen_CategoriesUL = new zen_categories_ul_generator;
$menulist = $zen_CategoriesUL->buildTree(true);
$menulist = str_replace('"level4"','"level5"',$menulist);
$menulist = str_replace('"level3"','"level4"',$menulist);
$menulist = str_replace('"level2"','"level3"',$menulist);
$menulist = str_replace('"level1"','"level2"',$menulist);
$menulist = str_replace('<li class="submenu">','<li class="submenu">',$menulist);
$menulist = str_replace("</li>\n</ul>\n</li>\n</ul>\n","</li>\n</ul>\n",$menulist);
echo $menulist;
?>
</div>
</div>
</div>
</li><!-- eof categories -->
and replace the <div class "levels">...</div> with <ul class="levels">....</ul> from the "quicklinks-li" above it, ie the first item in the mega menu. Then replace each <li> link - the a href="...." content with your links to your categories, and <?php echo whatever; ?> with your category name. Where your category name replaces 'whatever'. So you will end up with a list of your categories replacing the current dropdown list. Back up your tpl_mega_menu.php before you try it.
I hope that makes sense.
Last edited by godt; 18 Jun 2014 at 11:09 AM.
Oh. Before you remove the sidebox category list, use it to collect the links to the categories you want to display in the mega menu. Then turn off your sidebox. Adding categories is simply adding more <li>'s.
Oh god. Sorry. Not where your category name replaces 'whatever'. You category name should replace
<?php echo HEADER_TITLE_CATALOG; ?>
where 'whatever' refers to the bit in upper case in each of the <li>'s. So just replace the whole
<?php echo whatever; ?>
with your category name. Sorry. It's getting late.
Thank you!!
Glad it worked. Sorry about the three-part explanation.
Bookmarks