Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Separate Nav Category Menu into multiple lines?

Separate Nav Category Menu into multiple lines?

Locked

Views: 1,488

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
11 May 2009, 6:05 AM
#1
zkitten avatar

zkitten

New Zenner

Join Date:
Apr 2007
Posts:
19
Plugin Contributions:
0

Separate Nav Category Menu into multiple lines?

I think I've worn out the search button, I've looked, but not found specifically what I was looking for.

I'm wanting to change the top category menu a bit,
Right now, normaly it is just a long list, wrapping with the page.
I'd like to separate it into a couple lines (groups of 7 or so)

I've figured it's the categories_tabs.php file,
(\includes\templates\template_default\templates\categories_tabs.php)

This is what it looks like normaly,
[IMG]http://i4.photobucket.com/albums/y146/zkitten/helping/me/th_normal.jpg[/IMG]
(clicks to much larger)

This is what I've been able to do
[IMG]http://i4.photobucket.com/albums/y146/zkitten/helping/me/th_cando.jpg[/IMG]
(clicks to much larger)

changing this code

<?php
/**
 * Module Template - categories_tabs
 *
 * Template stub used to display categories-tabs output
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_categories_tabs.php 3395 2006-04-08 21:13:00Z ajeh $
 */

  include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORIES_TABS));
?>
<?php if (CATEGORIES_TABS_STATUS == '1' && sizeof($links_list) >= 1) { ?>
<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>
<?php for ($i=0, $n=sizeof($links_list); $i<$n; $i++) { ?>
  <li><?php echo $links_list[$i];?></li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>

into this

<?php
/**
 * Module Template - categories_tabs
 *
 * Template stub used to display categories-tabs output
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_categories_tabs.php 3395 2006-04-08 21:13:00Z ajeh $
 */

  include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORIES_TABS));
?>
<?php if (CATEGORIES_TABS_STATUS == '1' && sizeof($links_list) >= 1) { ?>
<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>
<?php for ($i=0, $n=sizeof($links_list); $i<$n; $i++) { ?>
  <li><?php echo $links_list[$i];?><?php if ($i+4<$n) { echo "<br />"; } ?></li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>

and what i'd like to have, is this-
[IMG]http://i4.photobucket.com/albums/y146/zkitten/helping/me/th_want.jpg[/IMG]
(clicks to much larger)

So, anyone know what i'm supposed to change?

21 May 2009, 5:06 AM
#2
zkitten avatar

zkitten

New Zenner

Join Date:
Apr 2007
Posts:
19
Plugin Contributions:
0

Re: Separate Nav Category Menu into multiple lines?

Bueller? Bueller?

8 Jun 2009, 11:02 AM
#3
villafiller avatar

villafiller

New Zenner

Join Date:
Oct 2006
Posts:
5
Plugin Contributions:
0

Re: Separate Nav Category Menu into multiple lines?

Hi - I've been trawling through looking to change the background of the navcat menu.

I'm definitely no expert (I depend on stealing other peoples tips and trial and error code changes)

I think that the thing you want to do may be achieved by modifying the display command in the stylesheet.css

#navMain ul li, #navSupp ul li, #navCatTabs ul li {
display: inline;

Here's a link to an explanation of 'display', with the ability to try out the different options at the bottom of the screen. -

http://www.w3schools.com/css/pr_class_display.asp

Hope that I'm right and this helps with your problem,

Andy