Breadcrumb navigation help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
robin1
Forum Newbie
Posts: 20
Joined: Thu Aug 01, 2002 4:36 pm

Breadcrumb navigation help

Post by robin1 »

Hello everybody,

I'm writing my own classified script for my website/learning and have to add i'm not the best php programmer, scale 1 to 10 i would put myself at 4 if that.

script background:
the classified script isn't designed for high use and have no interest in making it a full service, its just add on to the website to give my users the option to buy/sell/trade within the site.

I need help creating a breadcrump navigation for my classified script. All the tutorials or the plugins all talk about directory but my script isn't setup in directory format, its a simple script .

MySql DB and a table for the categories, primary category field and a sub category field example:
Vehicles(primary category) -->Cars(subcategory)
primary category is displayed on the main screen.

Need a navigation letting the user know at what category point the user is at, example: Vehicles>>Cars
and should be able to go back to the main categories if the use decided to go back to pick a new one.

I been trying to find a script and trying to figure out how to do this but keep running into a brick wall..

Any help you guys can give would be greatly appreciated
Thanks guys
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You are essentially going to have to tie a stage in the app to a parent stage somehow. I did this once in a non-directory layout using a categories. Basically every page had a home link. As soon as your page name changed to something other than the default, that page became the second location in the breadcrumb trail (not as a link, only as an identifier). If there were pages within that category, then the second place would become a link and the third place would become the location identifier for the page you are on.

It is not terribly difficult, as long as you have some idea of the logic you want to follow.
Post Reply