freakystreak — 2012-06-22T05:44:12-04:00 — #1
I have spent hours searching google, youtube and other resources to find a good, easy to follow tutorial on creating a breadcrumb trail navigation system in PHP but as yet haven't found it. Does anyone know of any such website, video cast that will be able to help me? If not then anyone want to help me into the right direction of where to start and what kind of techniques I should be looking at?
Any help would be really appreciated as always.
cups — 2012-06-22T08:55:40-04:00 — #2
Is this an addition for an existing site, or is it for something you are planning?
freakystreak — 2012-06-22T11:40:46-04:00 — #3
building a new site from scratch and just need to know which direction to go and what to process to take
cups — 2012-06-22T12:14:59-04:00 — #4
Will all the content come from a db, or will it be using files in the directory structure of the OS?
cups — 2012-06-22T12:19:07-04:00 — #5
If the answer is database, maybe if you can explain how you see the "folder/folder/file" structure evolving in your database, then we can suggest ways of doing this.
Is your data to be "polyhierarchical" ie. some content can appear in more than one path.
Might help if you explain what kind of site it is in general. A CMS? A blog? A gallery of products etc.
wonshikee — 2012-06-22T18:14:28-04:00 — #6
Your system must know the hierarchy of any given page, so that it can present the appropriate breadcrumb, which is simply a list of links going up the chain.
How this hierarchy is mapped is the key, usually mapped in the database.
frank1 — 2012-06-23T20:37:20-04:00 — #7
Well you may never get excat as you want but reading these i think you should be able to come up with something
freakystreak — 2012-07-02T08:48:00-04:00 — #8
Sorry for the delay in replying but I have been away. Firstly, yes the content is coming from a database. The content will be products for sale that are placed in categories. The data will be 'polyhierarchical'. To be honest I never that that doing a breadcrumb could be potentially so complicated! The basic structure will be something like this: 'brand/brand-model/product'
cups — 2012-07-02T09:03:33-04:00 — #9
It need not be complicated, but you are taking what is essentially a file system paradigm (folder/folder/file) and re-enacting it in a database.
If you are serious about a polyhierchical structure so that you can essentially have:
Where product1 is always the same page, but the breadcrumb permits the user to navigate "back up" to either :
.. depending on which way they got there, then the best option will be to maintain a referential table which stores all of those possible relationships.
But are you sure that is what you want? Can product1 really belong to many brands?