You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If http://hostname/page-1 is in the page-2 category, I’d like the breadcrumb to say “Home > Page 2 > Page 1”. The breadcrumb is currently just built from the path, so it would say “Home > Page 1”.
The breadcrumb is built from the Page#parent method.
I’d like Page#parent to return a page object for the parent (derived from the URL) or fall back to the page for the first category for pages that sit at the root of the site. If a page sits at the top level and doesn't have any categories, the home page would be returned.
I think this would sort out the breadcrumb.
The text was updated successfully, but these errors were encountered:
Yes, what this ticket is about what you've described as "Home > Cars > Supercars > Bugatti Veyron".
If memory serves all we need to do is to get Page#parent to pull the first category off the list of categories, as the breadcrumb_ancestors method already does the loop (i.e. Page#parent should only return a single page, or nil).
There are already some specs for the #parent method in models_spec.rb.
If
http://hostname/page-1
is in thepage-2
category, I’d like the breadcrumb to say “Home > Page 2 > Page 1”. The breadcrumb is currently just built from the path, so it would say “Home > Page 1”.The breadcrumb is built from the
Page#parent
method.I’d like
Page#parent
to return a page object for the parent (derived from the URL) or fall back to the page for the first category for pages that sit at the root of the site. If a page sits at the top level and doesn't have any categories, the home page would be returned.I think this would sort out the breadcrumb.
The text was updated successfully, but these errors were encountered: