views:

227

answers:

1

Hi I have some sites powered by Joomla, but with my current assignment I wanted to try something new and created with CodeIgniter a really basic CMS (just to suit my client's needs). Everything works fine except menus - multilevel menus like in Joomla, Drupal etc. with items and subitems...

My question is: do you know of any tutorials or texts abut implementing such a structure. I've tried the recursion thinggy with while getting children's IDs move downwards from the parent while searching for the currently displayed item's ID. I've tried also the Drupalish way with having a path parameter enclosing ID's all the way from top to bottom '1/23/123/3'. But all in all it was just too chaotic - code something, try it out.

If you have some idea on this topic - thanks in advice.

+1  A: 

I'm going to to assume that your challenge is in the database part of it?

Storing and querying hierarchical data in a relational database is not really intuitive. I've once written an article with a few possible solutions, largely inspired by others:

Hierarchical data in MySQL: Easy and fast

Ferdy