An improved version of spree's breadcrumbs
Ruby
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits ahead, 8 commits behind cnight:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/helpers/spree
lib
script
spec
.gitignore
.rspec
Gemfile
LICENSE
README.md
Rakefile
Versionfile
spree_better_breadcrumbs.gemspec

README.md

SpreeBetterBreadcrumbs

Just an update to the spree breadcrumbs to provide more intuitive usage of breadcrumbs. The products path and taxons path are seperate, and the breadcrumbs will also display the product name at the end.

An additional helper method has been added to provide a path to the last visited breadcrumb (either a taxon or the products path), to allow linking back to the last specific area the user was in. This is useful when a user adds something to their cart, they can be linked back to the last taxon they were browsing.

Example

Breadcrumbs now take an addition parameter, a product as parameter two:

<%=breadcrumbs(@taxon, @product, optional_seperator_string)%>

For backwards compatibility the optional separator string can also be passed as the second parameter, but doing so limits some of the functionality of the breadcrumbs.

To get the path to the last breadcrumb use:

<%=link_to 'back', last_crumb_path%>