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

menu separator

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-17-2006, 10:13 AM
 
maximer maximer is offline
 

Member
  
Join Date: Sep 2006
Posts: 22
 

Default menu separator

Hi,

is it possible to add menu separator in categories ?

I'd like have category menu like this:

category1
category2
---------
category3


regards
maximer
__________________
Version 4.0.18
Reply With Quote
  #2  
Old 12-17-2006, 07:53 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: menu separator

A basic way of doing this is as follows:

Open skin1/customer/categories.tpl

FIND:

Code:
{/section}


BEFORE ADD (Replace X1 and X2 with your categoryid's to break after, and you can add X3, X4 etc.):

Code:
{if ($subcategories[cat_num].categoryid eq "X1" OR $categories[cat_num].categoryid eq "X1") OR ($subcategories[cat_num].categoryid eq "X2" OR $categories[cat_num].categoryid eq "X2")}------{/if}

A more advanced way to do it, which would require custom coding, is to add a new admin checkmark field "Break After Category" in your admin section, where you could check the box to indicate a line break, and then modify the above code to check the database field instead of manually coding the categoryid.
Reply With Quote
  #3  
Old 10-08-2007, 07:21 PM
 
zebu zebu is offline
 

eXpert
  
Join Date: Oct 2006
Posts: 310
 

Default Re: menu separator

Hi Jon,

I was hoping to do a simalier thing - but cant find the /section you refer to. - but I have just moved to 4.1.8.

My customer categories file looks like below:

HTML Code:
{* $Id: categories.tpl,v 1.26 2005/11/17 06:55:37 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="modules/Fancy_Categories/categories.tpl"} {assign var="fc_cellpadding" value="0"} {else} {if $config.General.root_categories eq "Y"} {foreach from=$categories item=c} <font class="CategoriesList"> {* next line added to put menu image in zg *}<img src="{$ImagesDir}/menu_ball.gif" width="16" height="16" style="padding-right: 5px;" /><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {else} {foreach from=$subcategories item=c key=catid} {* next line added to put menu image in zg *} <img src="{$ImagesDir}/menu_ball.gif" width="16" height="16" style="padding-right: 40px;" /><font class="CategoriesList"><a href="home.php?cat={$catid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach} {/if} {/if} {/capture} { include file="menu.tpl" dingbats="button_horse.jpg" menu_title="Products" menu_content=$smarty.capture.menu cellpadding=$fc_cellpadding}


Did things change in the file structure in the upgrade?
__________________
Version 4.7.7
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 01:54 PM.

   

 
X-Cart forums © 2001-2020