I need to find a simple solution to makeing breadcrumbs… not based on directories.
Let say I have a top category - Electronics (pass variables id in url)
the I get a list of sub categories under electronics - clicking on the sub-category (pass variables id in url)
I need to put the 1-Electronics in the breadcrumbs, once I click on something like Televisions, I view a list of sub-sub-categories, with 1-Electronics > 2-Televisions in the breadcrumbs… We all know how they work… the thing is, I need to pass in it the url to create the array or struct.
Electronics > Televisions > Flat Screens > Sony 60inch Plasma
I was doing something like this for a project i did. Unfortunately it was SUPER db intensive, but basically what I did was recursively find the parent based on parent_id column until parent_id was nil. Adding rows to the struct as it went along.
This idea might work since you’re only doing it once per page.
Don’t have access to the exact project code right now, but pretty sure it was something like so… I MAY have created a unordered list and dumped that to screen instead of a array of structs, but the general idea is present. Also, recursive was the wrong word to use for what I was/am suggesting.