[eluser]uk81[/eluser]
Hi.
I want to create a path for a website like often seen on websites:
"You are here: home > foo > bar"
And I wanted to know if there is a easy way (maybe someone has done this before) to create such a path with CI.
My problem is, that I have several controllers, views, a library (normal way, if you work with CI) and every time one controller is called, which worked with my library, with several views and models, parse the data and at the end it will all put together in one big main-template to view it to the user.
The data and the calls are shared over the several classes I use/call. So it is not easy to just give one string one function to parse it.
I have several categories (in my website) and the user can view a service via one or more categories. He can navigate via a view ways also with subcategories.
So I have to know the parent category, the actual category and the service name and so on.
And I thought there is maybe a easy way. Maybe something like store one array in a library (or somewhere else) where every controller, function, library I call put a info in it, which I can parse afterwards into a path like shown above.
The other (complicated way, I donĀ“t wanted to go) is to write an extra function for every controller which get the relevant data from the database, get all data step by step and parse the path self. This is in my situation a little bit complex, because there are so many variable ways to go in my application.
This would also be a feature request (if there is nothing in code igniter). Just give (maybe with a special controller function) a string back to CodeIgniter which is stored in an array. And with one CI-function call the programmer get a string parsed like: "You are here: parameter 1 > parameter 2 > parameter 3"
Thanks guys.