crumble icon indicating copy to clipboard operation
crumble copied to clipboard

Making the last crumb not be a link

Open snoblenet opened this issue 16 years ago • 8 comments
trafficstars

Hi Matt,

Great work. Functions perfectly.

How do I make the last crumb in the breadcrumbs trails -- the crumb that represents the current page -- not be a link?

snoblenet avatar Jul 25 '09 08:07 snoblenet

+1 !

nickel avatar Aug 13 '09 17:08 nickel

Hi Nickel. Sounds promising. Will you humour a newbie with a syntax example?

snoblenet avatar Aug 16 '09 08:08 snoblenet

There's no support for anything like that. Patches are most welcome.

roidrage avatar Aug 28 '09 15:08 roidrage

Okie, just pushed a change for this, have a lookie and let me know if that works for you.

roidrage avatar Aug 28 '09 16:08 roidrage

Great! Works fine. Thx! :-)

nickel avatar Aug 29 '09 19:08 nickel

Cheers Matt.

I did the following in my app root:

script/plugin install git://github.com/mattmatt/crumble.git --force

Then I updated initializers/breadcrumbs.rb like this:

 Breadcrumb.configure do
   crumb :root, "Drominay", :root_url
   [snip]
   trail :home, :index, [:home]
   [snip]
   delimit_with " → "
   dont_link_last_crumb
end

The last crumb is still linking to the current page. Sorry if I'm missing something obvious. Any thoughts?

snoblenet avatar Aug 29 '09 22:08 snoblenet

Did you restart the app afterwards? I just tested it, also with just one crumb in the trail, and it works fine.

roidrage avatar Aug 30 '09 10:08 roidrage

I just reworked the code a little bit, it was a bit flawed. Could you try it with the current master? Thanks!

roidrage avatar Aug 30 '09 11:08 roidrage