Forum Moderators: coopster

Message Too Old, No Replies

breadcrumbs

         

kirst

8:42 am on Sep 2, 2005 (gmt 0)

10+ Year Member



Hi everybody.
I would like to insert with a PHP include a breadcrumbs in each page of my website.
I would like to set the breadcrumbs from an admin webpage, where I want to set everything about the menu navigation in the breadcrumbs.
Online I've found only breadcrumbs that watch only the sub-directories and they show you a simple menu like home>directory>tag title of the page.
Please tell me a good breadcrumbs script!
Thank you

henry0

1:22 pm on Sep 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Kirst,
Welcome to WebMasterWorld
look HERE [google.com]

kirst

9:47 pm on Sep 2, 2005 (gmt 0)

10+ Year Member



I'm sorry but I've not found what I was looking for.
I've found only a script but I think it doesn't work.
I want to add and <?php include("Breadcrumb.inc");?> in all my pages and in Breadcrumb.inc I want to set everything about breadcrumbs, for example the name of the pages, their "level" etc.
Can you help me?
Thanky ou

kirst

10:57 pm on Sep 4, 2005 (gmt 0)

10+ Year Member



up

ergophobe

12:25 am on Sep 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It sounds like you want breadcrumbs built on a hierarchical menu structure, but what you're finding is ones that are built on a URL structure.

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.