navigasmic icon indicating copy to clipboard operation
navigasmic copied to clipboard

Generate a breadcrumb trail based on my primary menu?

Open jfrux opened this issue 11 years ago • 4 comments

Is this possible?

jfrux avatar Feb 19 '13 16:02 jfrux

I'm not sure of the status of the breadcrumb builder:

It's sort of a hard thing to accomplish from a navigation structure (as there can be a lot of variation), but give it a try.

https://github.com/jejacks0n/navigasmic/blob/master/lib/navigasmic/builders/crumb_builder.rb

jejacks0n avatar Feb 19 '13 16:02 jejacks0n

In my experience bread crumbs don't exactly match navigation -- let's say for instance I put common actions into navigation:

Manage Articles
  Create New Blog Post
  Search Blog Posts

These aren't exactly useful for creating bread crumbs to the rest of the actions that might exist on "articles". So while it's possible, it's not optimal. I don't recommend it as an end all solution, and there's other libraries that can accomplish more accurate bread crumb navigation from a controller/action level that might better suite your needs (at least that's what I've personally found).

jejacks0n avatar Feb 19 '13 16:02 jejacks0n

You would have to ensure that it was semantically sound. Convention over configuration so to speak.

In my situation, all of mine would be based on the action and controller / route.

Ideally breadcrumbs would function similar to the way Rails handles route names.

If rails can build variable names for their routes semantically, then basic breadcrumbs should be possible… Similar to how ActiveAdmin handles breadcrumbs…?

Ideally, I'm looking for something similar to how activeadmin outputs breadcrumbs…

jfrux avatar Feb 19 '13 16:02 jfrux

The way this is resolved in Drupal, for instance, is that the menu items themselves have options relating to how the item behaves on a breadcrumb trail context. Would that not resolve the dilemma?

hazah avatar Sep 23 '13 20:09 hazah