View Single Post
  #8  
Old 12-14-2014, 06:58 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: main categories drop down list Please help!

Okay here goes:
Make sure you are using a custom skin. Don't edit a default skin. Flyout Menus module must be active.

In your custom skin create the file:
modules/Flyout Menus/Icons/fancy_categories.tpl
With this content:
Code:
<div class="nav_menu"> {if $fancy_use_cache} {fancycat_get_cache} {else} {include file="modules/Flyout_Menus/Icons/fancy_subcategories.tpl" level=0} {/if} <div class="clearing"></div> </div>

In your custom skin create the file:
modules/Flyout Menus/Icons/fancy_subcategories.tpl
With this content:
Code:
<ul> {foreach from=$categories_menu_list item=c key=catid name=$loop_name} <li> <a href="home.php?cat={$catid}"> {$c.category|amp} </a> {if $c.childs and $c.subcategory_count gt 0} {include file="modules/Flyout_Menus/Icons/fancy_subcategories.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1} {/if} </li> {/foreach} </ul>
In your custom skin edit or create the file:
customer/head.tpl
Where you want the menu to show up add:
Code:
{include file="modules/Flyout_Menus/Icons/fancy_categories.tpl"}

Add the following CSS to your css/altskin.css:
Code:
#header .line1 .nav_menu { height: 40px; } .nav_menu ul { list-style: none; margin: 0; padding: 0; } .nav_menu ul > li { float: left; position: relative; text-align: center; } .nav_menu ul a:link, .nav_menu ul a:active, .nav_menu ul a:visited, .nav_menu ul a:hover { display: block; min-width: 120px; line-height: 40px; background: #ccc none; color: #000; } .nav_menu ul a:hover { background: #222 none; color: #fff; } .nav_menu ul > li > ul { display: none; position: absolute; top: 40px; } .nav_menu ul > li:hover > ul { display: block; z-index: 10; }

Position the container and style the menu as needed. This only provides for one level of drop down, the next level can easily be accommodated by adding to the CSS.
Tada!
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote