?
Solved

Wide menu for magento

Posted on 2012-08-20
8
Medium Priority
?
962 Views
Last Modified: 2012-09-06
Hi guys,

I'm trying to create a wide menu navigation bar for a custom Magento theme identical to what the are using here: http://www.jmldirect.com/ 

Been desperately trying to recreate this but to no avail. I'm still quite new to jQuery drop down menus.

Please could you help? You would be saving my life!!!!
0
Comment
Question by:rafique12
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 38313507
What are you trying to create? Just the menu or the dropdown look as well?
0
 

Author Comment

by:rafique12
ID: 38313522
The wide dropdown look inluding image thumbnails. I need it identical to what they have here: http://www.jmldirect.com/

Been here for hours trying!?!?!
0
 
LVL 58

Expert Comment

by:Gary
ID: 38313552
Paste/attach what you have so far.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 

Author Comment

by:rafique12
ID: 38313631
I have this code which is taken from another Magento theme: http://8theme.com/site_demo#blanco

When I attempt integrate the elements my page fails!

<?php
/**
 * $this->renderCategoriesMenuHtml() supports optional arguments:
 * int Level number for list item class to start from
 * string Extra class of outermost list items
 * string If specified wraps children list in div with this class
 */
?>
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
<div class="nav-container">
    <div class="right-bg">
        <ul id="nav">
            <li class="level0 first homelink"><a href="<?php echo $this->getBaseUrl(); ?>"><span><?php echo $this->__('Home') ?></span></a></li>
            <?php if($_menu): ?>
                <?php echo $_menu ?>
            <?php endif ?>
            <?php $additionalLink = themeOptions('additionalLink'); ?>
            <?php $additionalLinkUrl = themeOptions('additionalLinkUrl'); ?>

            <?php if ($block1 = $this->getChildHtml('nav_block1')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block1')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block2')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block2')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block3')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block3')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block4')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block4')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block5')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block5')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block6')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block6')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block7')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block7')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block8')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block8')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block9')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block9')->getTitle(); ?>
            	<li class="level0 block_li parent">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?> 

            <?php if ($block1 = $this->getChildHtml('nav_block10')): ?>
                <?php $block1Title = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load('nav_block10')->getTitle(); ?>
            	<li class="level0 block_li parent last_block">
                    <a class="level-top" href="#"><span><?php echo $block1Title; ?></span></a>
                    <div class="nav_block"><?php echo $block1; ?></div>
                </li>
    		<?php endif; ?>              
            
            <?php if($additionalLinkUrl && $additionalLink): ?>
                <li class="level0 clearence"><a href="<?php echo $additionalLinkUrl ?>" title="<?php echo $additionalLink ?>"><span><?php echo $additionalLink ?></span></a></li>
            <?php endif ?> 
                 
        </ul>
    </div>
</div>

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
ID: 38313700
How many menu items and sub menu items do you have?
Sometimes it can be easier to just write a static menu if your categories are unlikely to change much or that often.
There used to be a megamenu for free on Connect that did something similar but it appears to be gone now?
0
 

Author Comment

by:rafique12
ID: 38313882
I could create a static menu but it is likely that the categories and products will need to be updated regularly. Not sure on the best way to progress...
0
 
LVL 58

Accepted Solution

by:
Gary earned 1000 total points
ID: 38313938
It doesn't matter about how often the products change, unless you plan on adding them into the menu in which case trying to do something automated will take more time than doing it statically.
If a category may only be added or removed or a new one added irregularly i.e. maybe once or twice or month then a static menu would be quicker - i.e. made up in less than an hour.
I know since I did the same thing you want for a magento site.
0
 

Author Comment

by:rafique12
ID: 38314732
Okay... how do I do it? Should I create a static block?
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question