essjay_d12 Posted November 16, 2006 Share Posted November 16, 2006 I need to know whats the best way to create a left hand side navigation menu where when you click on a department it reveals more departments within it...e.gComputingClothesElectricaland if you click on clothes it would then display....computingClothes + Shorts + T-shirts + TrousersElectrical is it best to use $_GET ... and also what about database design?Thanksd Link to comment https://forums.phpfreaks.com/topic/27450-navigation-menu-help/ Share on other sites More sharing options...
steveclondon Posted November 16, 2006 Share Posted November 16, 2006 Yes it is best to use get as you want search engines to be able to follow your catagories. As for database design as an example you would have your catagory id, catagory name, and then parent id. So as an example if parent id is 0 its at the top of the tree then if cat 1 were shorts any sub cats would have the parent id of 1 etc. Link to comment https://forums.phpfreaks.com/topic/27450-navigation-menu-help/#findComment-125570 Share on other sites More sharing options...
eightFX Posted November 16, 2006 Share Posted November 16, 2006 I have just recently coded a left hand navigation in the format you have mentioned. I used the get function and a database with three fields to determine where each is to fall under as steveclondon mentioned. I found it to be very easy to set up and easy to manipulate as well. If you get your statements all lined up right you should have no issue. Link to comment https://forums.phpfreaks.com/topic/27450-navigation-menu-help/#findComment-125580 Share on other sites More sharing options...
essjay_d12 Posted November 21, 2006 Author Share Posted November 21, 2006 Can anyone help me with what the psuedo code would look like for this?I have set up a table 'test' cat_id, name and par_idThe sub categories could be unlimited.... this is where im having problems.Would it involve a for loop?cheersd Link to comment https://forums.phpfreaks.com/topic/27450-navigation-menu-help/#findComment-127890 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.