Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Fancy Categories Horitontal Menu Quesion

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-03-2013, 05:54 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default Fancy Categories Horitontal Menu Quesion

Can anyone tell me how i can use the xcart built in flyout menu for the categories for a horizontal version at all please ?

Ive got this for my menu

<div id='cssmenu'>
<ul>
{assign var="loop_name" value="subcat`$parentid`"}
{foreach from=$categories_menu_list item=c key=catid name=$loop_name}

<li class="has-sub">
{strip}
<a href="home.php?cat={$catid}" class="has-sub">
{$c.category|amp}
{if $config.Flyout_Menus.icons_display_products_cnt eq 'Y' and $c.top_product_count gt 0}
({$c.top_product_count})
{/if}
</a>
{/strip}

{if $c.childs and $c.subcategory_count gt 0 and ($config.Flyout_Menus.icons_levels_limit eq 0 or $config.Flyout_Menus.icons_levels_limit gt $level)}
{include file="`$fc_skin_path`/subcategories.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1}
{/if}
</li>

{/foreach}
</ul>
</div>

And it works ok with my CSS i have in place but the drop down menu isnt appearing, id really appreciate any tips or help on this
__________________
X-Cart Version 4.55
Reply With Quote
  #2  
Old 09-04-2013, 03:44 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Fancy Categories Horitontal Menu Quesion

Here is some code I've been using for a client site.

horiz_menu.tpl
Code:
<div id="drop-down-menu"> <ul id="nav" class="dropdown dropdown-horizontal"> {assign var="loop_name" value="subcat`$parentid`"} {foreach from=$categories_menu_list item=c key=catid name=$loop_name} <li class="{$c.category|amp}{if $smarty.foreach.$loop_name.first} first{/if}"> <a href="home.php?cat={$catid}"{if $smarty.foreach.$loop_name.last} class="last"{/if}>{$c.category|amp}</a> {if $c.childs and $c.subcategory_count gt 0} {include file="customer/sub_menu.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1} {include file="customer/mega_menu.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1} {/if} </li> {/foreach} </ul> </div>
sub_menu.tpl
Code:
{assign var="loop_name" value="subcat`$parentid`"} <ul> {foreach from=$categories_menu_list item=c key=catid name=$loop_name} <li class="{$c.category|amp}{if $smarty.foreach.$loop_name.first} first{/if}"> <a href="home.php?cat={$catid}" class="{if $c.childs and $c.subcategory_count gt 0}dir {/if}{if $smarty.foreach.$loop_name.last}last{/if}">{$c.category|amp}</a> {if $c.childs and $c.subcategory_count gt 0} {include file="customer/sub_menu.tpl" categories_menu_list=$c.childs parentid=$catid level=$level+1} {/if} </li> {/foreach} </ul>
__________________
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
  #3  
Old 09-04-2013, 04:15 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default Re: Fancy Categories Horitontal Menu Quesion

thanks for that mate, but when i apply the code to mine is seems blank
__________________
X-Cart Version 4.55
Reply With Quote
  #4  
Old 09-04-2013, 05:05 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Fancy Categories Horitontal Menu Quesion

Well, I saw some mistakes and removed those, also cleaned it up and removed a div or two.

I am just posting this as an example of how I accomplished this. Try turning off cacheing for flyout categories and see if that helps.
__________________
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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:42 AM.

   

 
X-Cart forums © 2001-2020