Forum Moderators: coopster

Message Too Old, No Replies

Site hierarchy context pointers in the banner of a page

What's the name for this technique?

         

fish_eye

1:31 am on Aug 1, 2005 (gmt 0)

10+ Year Member



I'm trying to implement one of those site hierarchy context pointer thiniges in the banner of a page. The type that has links up to the parent and the grandparent. You know the sort of thing:

Section A -> Sub-section A.1 -> Page 42

I want to do some research into it first. The technique has a specific name but I can't remember what it's called?

encyclo

1:34 am on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are looking for the phrase breadcrumb navigation. ;)

fish_eye

1:44 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Indeed - many thanks - now.... do you have a quick and easy php solution (kind of kidding).

I guess the proper way to do it is to have all my pages stored in a database and I use the content management system for that database to build my site map and my breadcrumbs?

At the moment I simply have the head, banner, menu and footer as includes. I guess I can derive the context of where I am (from within my included banner or menu) using REQUEST_URI (or somesuch) and then deciphering the slashes linking this back to details of the structure I have stored somewhere (in another include if I don't want to use a database)?

encyclo

1:57 am on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not really a PHP guru, but if you are simply using PHP includes for sections of each otherwise static page, a really quick and dirty solution could be to set the page's breadcrumb's as variables before including the head.

<?php
$grandparentCat="Widgets";
$parentCat="Blue Widgets";
include ($_SERVER["DOCUMENT_ROOT"]."/includes/head.inc.php");?>

Then in the head section check to see if the variables have been set and echo the appropriate breadcrumb. The above is hopelessly incomplete but you should get the idea...

fish_eye

2:22 am on Aug 1, 2005 (gmt 0)

10+ Year Member



I do get the drift - yes thanks.

It's not a huge site, and what's there is pretty static, it just grows a bit now and then so this is probably a good option.

It has a very specific topic / user base so the page names / topics are a bit jargonish and would benefit from breadcrumbs I believe.

Many thanks, Sam.