sdc — 2011-11-13T19:45:57-05:00 — #1
Hello, I have spent hours searching for an elegant and simple php breadcrumb solution. Don't want to use a Database.
Can you please help me find a script I can use to implement and learn?
starlion — 2011-11-14T08:37:16-05:00 — #2
There's probably a reason you've spent hours searching for one that doesnt use a database. The immediate answer is: Use a database.
Even if you dont use a database, you've got to store the information about what page leads to what somewhere... which is the equivilant of having a database.
smftre — 2011-11-14T09:48:32-05:00 — #3
Step 1: Add all pages into a database, otherwise how are you going to navigate to the page when you click it?
Step 2: Make sure each page has a parent/hierarchy to be able to do some SQL on.
Step 3: You're done!
N.B. If you are trying to do this on static html files and want to build a tree around that then you will probably have to do the breadcrumbs statically too. Or you could always add them into an associated array and do it all in PHP.