Closed roscom closed 12 years ago
I'm sorry, but I didn't understand the issue.
Sorry. PagesController excerpt:
class PagesController < ApplicationController
add_breadcrumb "home", :root_path
def aboutus @title = 'About Us' @wire_frames = %w(08) add_breadcrumb bc_title, page_url end
def contactus @title = 'Contact Us' @wire_frames = %w(07) add_breadcrumb bc_title, page_url end ..........
Case #1 Navigating from page to page will always render the breadcrumb trail as "Home > [current page]"; not "Home > page >next page > next page". You could say that is reasonable behaviour.
Case #2 If I navigate to another controller, say, "JobsController" all I get is the first add_breadcrumb from the jobs controller action and no prior breadcrumb history from the pages controller.
Clearly I am doing something wrong else I wouldn't have confused you. Is that how it is supposed to work, maybe? Or have I misunderstood something.
And I appreciate your help.
Ross
Breadcrumb navigation is intended to display current navigation status, not hold user navigation history. If the user requested JobsController#index, why would you display the breadcrumb navigation for PagesController#contact?
Yes, perhaps a bad example. I think I may have the wrong understanding of the gem's purpose. Can you point to an example where it is deployed as you intended?
I don't have any public example. However, if you search for breadcrumbs_on_rails, there should be a few examples. https://github.com/search?utf8=%E2%9C%93&q=breadcrumbs_on_rails&type=Everything&repo=&langOverride=&start_value=1
I am trying out the gem.
Noticed that the trail seems to be within controller; that is, it resets when navigating to a new controller thus destroying the trail.
Using: breadcrumbs_on_rails (2.2.0) / rails 3.0.12 / ruby1.8.7-p358.
Would appreciate advice.
Regards