X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   menu separator (https://forum.x-cart.com/showthread.php?t=27422)

maximer 12-17-2006 10:13 AM

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

Jon 12-17-2006 07:53 PM

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.

zebu 10-08-2007 07:21 PM

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?


All times are GMT -8. The time now is 06:05 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.