kubaw / spree_better_breadcrumbs

An improved version of spree's breadcrumbs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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%>

About

An improved version of spree's breadcrumbs

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Ruby 100.0%