1

I can't find a good mega menu on the web. I want a mega menu which shows thumbnail categories directly in the dropdown menu.

But I can't find it, I tried many mega menu but they didn't work.

So I want to know if it's possible to do it myself, and if so, how to achieve it. Thanks

EDIT

It's inside the Topmenu.php file (in module-theme folder).

By default we have this :

            $html .= '<li ' . $this->_getRenderedMenuItemAttributes($child) . '>';
            $html .= '<a href="' . $child->getUrl() . '" ' . $outermostClassCode . '><span>' . $this->escapeHtml(
                    $child->getName()
                ) . '</span></a>' . $this->_addSubMenu(
                    $child,
                    $childLevel,
                    $childrenWrapClass,
                    $limit
                ) . '</li>';

And I want something like this :

            $html .= '<li ' . $this->_getRenderedMenuItemAttributes($child) . '>';
            $html .= '<a href="' . $child->getUrl() . '" ' . $outermostClassCode . '><span>' . $this->escapeHtml(
                    $child->getName()
                ) . '</span>'.$child->getThumbnail().'</a>' . $this->_addSubMenu(
                    $child,
                    $childLevel,
                    $childrenWrapClass,
                    $limit
                ) . '</li>';

where $child->getThumbnail is the thumbnail of the category

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.