Site navigation using db

I would like to save the site structure in database. There would be tables for page categories and pages. The pages table would contain page contents.

So far it’s easy enough, but what would be the best way to draw the navigation menu? The menu should show page categories and their pages. It should be able to highlight the current page.

Hierarchical_menu could probably handle the end part, but it’s not very easy to get the data structure from the db and feed it to hierarchical_menu. At least for me, as I only just completed the RoR Tutorial.

Hierarchical_menu: http://rubydoc.info/gems/hierarchical_menu/0.1.4/frames

  • Jussi