Forum Moderators: coopster
It's fairly easy, but it depends a little on what you want. I think the easiest was is as follows:
1. You have a database table that generates your menus using parent-child relations to set up categories. Categories have, for example
- id
- parent_id
- dir // url directory
- menu // menu name for this cat
- crumb // breadcrumb name
2. Your page gets put in a category. If the page is not coming from a db, then you could use the $_SERVER['HTTP_REQUEST'] value to figure out what was requested. Then you look that up in table that has
- page_id
- page_url //indexed!
- page_cat
Once you have the page category you send that the breadcrumbs.inc and have it reconstruct the category hierarchy. Have a non-hierarchical site perchance? Then I'd just go with Drupal CMS (or whatever you want to call it) and use that.