Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hiding Subcategories On Categories Menu Using UL Categories Contribution


Guest

Recommended Posts

I have installed 'Category Box as Nested Unordered List for EZ(er) CSS & Dynamic menus' contribution for my store (http://www.oscommerce.com/community/contributions,4201)

 

I want it to behave in a way where when a category is picked, the category list doesnt expand to show sub categories in the menu, instead just loads the sub categories in the main area of the site.

 

How do I go about doing this? I changed the ul_categories.php 'show full tree' setting to false but this just made it so the menu wasnt fully expanded when nothing was clicked rather than the effect of not showing the sub categories at all that I require.

 

it's probably the same for the usual categories list aswell as the UL contribution list but im unaware how to do that either.

 

To clarify:- I dont want to show sub categories at all in my navigation menu but still make them accessible when the main category is clicked in the menu.

 

Thanks.

Link to comment
Share on other sites

  • 3 weeks later...

Not sure if this will work as I dont have the contrbution on-hand, but in your ul_categories.php look for

 

// Create the root unordered list
function tep_make_cat_ullist($rootcatid = 0, $maxlevel = 0){

And replace with

// Create the root unordered list
function tep_make_cat_ullist($rootcatid = 0, $maxlevel = 1 ){

 

See if that works. Backup first.

 

Basically try adjusting the "$maxlevel" to how deep you want it to go.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...