Project

pankuzu

0.0
No commit activity in last 3 years
No release in over 3 years
Generate breadcrumbs simply.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 4.0
 Project Readme

Pankuzu

Pankuzu generates breadcrumbs html. (Pankuzu means bread-crumbs in Japanese.)

Usage

Put on breadcrumbs helper in your view file.

app/views/layouts/application.html.erb:

<%= render "breadcrumbs" %>

Add breadcrumb each views.

app/views/posts/show.html.erb:

<%
add_breadcrumb "Home",          root_path
add_breadcrumb "Listing Posts", posts_path
add_breadcrumb "A Post",        @post
%>

breadcrumbs helper puts html below.

<ol class="breadcrumbs">
  <li class="breadcrumb"><a href="/">Home</a></li>
  <li class="breadcrumb"><a href="/posts">Listing Posts</a></li>
  <li class="breadcrumb"><a href="/posts/12345">A Post<a></a></li>
</ol>

Installation

Add this line to your application's Gemfile:

gem "pankuzu"

And then execute:

$ rails generate pankuzu:install

This generator creates _breadcrumbs.html.erb in app/views/application directory.

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.