creating a multi-level category search/navigation system

Reply

Join Date: Apr 2008
Posts: 35
Reputation: cali_dotcom is an unknown quantity at this point 
Solved Threads: 0
cali_dotcom cali_dotcom is offline Offline
Light Poster

creating a multi-level category search/navigation system

 
0
  #1
Feb 27th, 2009
hi, i'm creating the admin section for a multi-level category search/navigation system. i mean like, when a visitor comes to the site and they are looking for data, first a list of categories appears. for example ..... states....departments......etc. so when a user clicks on states, he gets another list of subcategories, and it can go on till he reaches the file/info he's looking for. i also wanted to make it multi dimensional so that a particular piece of information could be reached by different paths.

on the admin side, i dont want to put a limit on the number of categories/levels an administrator can put in.

Now my problem is figuring out the logic necessary to sort and store the data when the administrator uploads them so that in the front end, it would be easy for visitors to find them.

does anyone have any ideas how i can go about this?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 858
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 139
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: creating a multi-level category search/navigation system

 
0
  #2
Feb 28th, 2009
Sounds like you should be able to add several categories to a piece of data (say a record), allowing it to be reached by different paths. Next to that you would need to have your categories setup in a table (or multiple), ordering them the way you need them (parent, child) in your search system. Much like a menu system. You define a category, and what other category is it's parent. Can you give an example of how one piece of data would be reached by different paths ?
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 103
Reputation: jakx12 is an unknown quantity at this point 
Solved Threads: 4
jakx12's Avatar
jakx12 jakx12 is offline Offline
Junior Poster

Re: creating a multi-level category search/navigation system

 
0
  #3
Mar 1st, 2009
i suggest: setting up a table that has fields determine what the sub catagories parent is. That is is the easiest way. When displaying the links, you will need to select all from the database were the parent category is equal to the previous link clicked. I suggest you do this with ajax and use php and a mysql database with the fields like so:
Parent | Link
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: creating a multi-level category search/navigation system

 
0
  #4
Mar 1st, 2009
A good way to implement this is giving each subcategory a reference (field) to the parent category's unique ID. You can do this with an auto-incrementing int field. A root category can just have the parent -1 (for example) to specify that it is at the top level.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC