Member Avatar for iamthwee

Just wondering about breadcrumbs and how they work. Specifically in CI.

Is it worth implementing?


Recommended Answers

All 4 Replies

For a site with lots of content, I think it is worth implementing. Another scenario where breadcrumbs is useful is when you have a hierarchical categories like

      Acura, BMW, Chevrolet, Infiniti, Jaguar, Lexus, Mercedes
       red, blue, yellow, black, orange
       front wheel, rear wheel
       Surface Street
       10 - 20 MPG, 21 - 40 MPG
       10 - 20 MPG, 21 - 40 MPG

The breadcrumbs for the above would be [Automotive][Make][Year][Color][Drive][Effeciency]. The user can move from one item to the other, because the link will be assigned in the router. So, when the Make is clicked, the controller Automotive will be instantiated and the method Make will get executed. The initial selections are stored in session so that the user can hop around.

The controller would be the Automotive and the methods connected to the model are

Make // sorts the model 
Year // sorts year
Color //sorts color
Drive //sorts Drive
Effeciency //sorts effeciency

The route would be

automotive : 'automotive';
year       : 'automotive/year';
Color      : 'automotive/color';
drive      : 'automotive/drive';
effeciency : 'automotive/effeciency';

Here is a light breadcrumbs library for CI and pretty much the implementation is pretty much similar to my example above.

Member Avatar for iamthwee

Thanks guys will read over that and try implimenting tomorrow.

This is perfectly working. I would like to say thanx to you for provide sourse code. thanx a lot man.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.