4
Contributors
4
Replies
30
Views
3 Years
Discussion Span
Last Post by yessi_1
0

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

Automotive
  Make
      Acura, BMW, Chevrolet, Infiniti, Jaguar, Lexus, Mercedes
   year
       2000,2001,2014
   Color
       red, blue, yellow, black, orange
   Drive
       front wheel, rear wheel
   Effeciency
       Surface Street
       10 - 20 MPG, 21 - 40 MPG
       Highway
       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.

0

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

Edited by happygeek: spam deleted (fake sig)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.