Advertisement:

Author Topic: multiple levels of categories  (Read 2933 times)

lancer

  • Newbie
  • *
  • Posts: 15
multiple levels of categories
« on: December 20, 2011, 05:16:06 am »
It is my understanding that the reason osclass does not have sub sub categories(or even further depth than that), is because the homepage wouldn't be able to handle that many categories or that it would be lengthy.  I believe a good solution to this problem and in general a nice option to have, is to make multiple drop down boxes.

The perfect visual example of this is the automotive plugin.  You select one drop down box(categories) and according to that selection the next drop down box would give you your options(sub categories) and so on.

Picture attached to show what I am talking about.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: multiple levels of categories
« Reply #1 on: December 27, 2011, 01:38:07 pm »
Hi lancer,


Yes and not, this has been answered several times on the forum.

This is a bit old reply :

Quote
Here we have a problem. OSClass could handle as many sub-levels as you want (sub-sub-sub-sub-category). The helpers can not. Helpers are functions to help people talk with OSClass (themes and plugins), so with a few functions you could display categories and sub categories without knowing much of PHP or working with variables directly. The problem is that we didn't find a way to make it easier if there're more than 2 level of categories, and trust me, it's no easy. So you could use as many levels as categories, but the theme will not show them correctly.

And here a more recent one on how to handle it : http://forums.osclass.org/suggestions/grandchildern-catergories/msg17095/#msg17095

The problem is that is get to messy after the first level of subcategories, that we could not offer a helper function. Also to avoid that becoming a problem, more than 2 levels have been disabled in the admin area, but if you modify the DB you could get as many levels as you want to. Plus the rest of the functions should work with as many levels as you want.