chrisfarber / ember-breadcrumbs

An Ember.js component for adding breadcrumbs to your app.
MIT License
79 stars 34 forks source link

Can we do the nested breadcrumb? #6

Closed kithokit closed 9 years ago

kithokit commented 9 years ago

For example, when in ProductsController

the breadcrumb display "product"

when in ProductsNewController the breadcrumb display "product" > new

Right now the behaviour seems only display "new" the product breadcrumb are dismiss

chrisfarber commented 9 years ago

This is already supported. By design, breadcrumbs will be displayed for all currently active routes.

Note that this means that how you organize your routes will have ramifications. You must nest your route for creating a new product underneath the route (or resource) for products.

albertpak commented 9 years ago

I'm running into an issue of nested routes...I have Dashboard and then under it Profile...but then i go to profile, in breadcrumbs it shows Dashboard path only

chrisfarber commented 9 years ago

If you open the Ember Inspector and look at the View Tree, do you see your dashboard controller listed?

Only controllers that are currently active (i.e., listed in the view tree) will have breadcrumbs displayed. If, for example, you put the bread crumb on your DashboardIndexController, it would not be displayed when you are on your Profile route. If that's the case, you could put the breadcrumb on your DashboardController instead.