picnictutorials — 2013-02-14T13:13:35-05:00 — #1
Hello. I would like to implement a breadcrumb type nav for my site. I've never done this before. So a little direction would be helpful. I have 1000+ pages and no bread crumb functionality at all in any of them currently. Aside from the painful process of adding each to each pages html, is there any easier way to do this? Possibly with jQuery, php, or other? I don't want anything fancy. Just simple text links just like sitepoint. Maybe some magical simple script I can add that will read my url structure and populate them automagically.
ryan_mcintyre — 2013-02-14T15:43:09-05:00 — #2
Most systems with a breadcrumb manager will come standard in a Framework. I will recommend php for this. The difficulty of the task ahead of you will partly rely on how your pages are currently structured (especially since you have so many). Are these flat html pages that have all been put together individually or are you using a standard template file? If they are all .html files, you will need to do one of two things (in my opinion): 1) Configure your server to allow php in your html docs, or 2) Make sure all .html files are converted to .php (simple as changing the .html to .php - which you should be able to do with a Find/Replace).
You're going to need to keep very good track of what you are doing depending on your answer to the last couple of questions. You could theoretically use $SERVER['HTTPREFERER'] to track the last page (but this isn't always accurate in all browsers). The best method is to likely use a PHP SESSION Variable, but you're going to have to be careful on dealing with that so you don't end up with a "perpetual" breadcrumb string...will take some coding and tracking to do this correctly. Let me know if you need more detail.
picnictutorials — 2013-02-14T16:11:52-05:00 — #3
They are all php pages coded soley by me - no framework. I actually overstated that number. Discounting the demos there are only around 400.