Closed simonc closed 11 years ago
I'm trying to do the exact same thing. Any luck?
After taking a look at the source code, I realized that it was possible to do this using block syntax. Here is a block that generates Twitter Bootstrap compatible breadcrumbs (git://gist.github.com/2706367.git):
<% render_crumbs do |crumbs| %>
<ul class="breadcrumb">
<% crumbs.each_with_index do |crumb, index| %>
<li>
<%= link_to *crumb %>
<%= '<span class="divider">/</span>'.html_safe unless index >= crumbs.size - 1 %>
</li>
<% end %>
</ul>
<% end %>
Sorry, I didn't try too hard and created Ariane ;) Crummy is great but I needed more customization.
Nice, I'll have to take a look at your project as well.
I try config.html_list_separator = '< li class="class_separator">|</ li>'.html_safe
works good.
I see the
html_list_separator
option in the README but cannot find where and how it's supposed to be used in the code.Is it a work in progress ? I'm trying to make crummy work with the twitter bootstrap and the separator seems to take place after the link, in a
span
.