Module | WillPaginate::ViewHelpers |
In: |
lib/will_paginate/view_helpers.rb
lib/will_paginate/view_helpers/link_renderer.rb lib/will_paginate/view_helpers/link_renderer_base.rb |
The main view helper is will_paginate. It renders the pagination links for the given collection. The helper itself is lightweight and serves only as a wrapper around LinkRenderer instantiation; the renderer then does all the hard work of generating the HTML.
pagination_options | [RW] |
Write to this hash to override default options on the global level:
WillPaginate::ViewHelpers.pagination_options[:page_links] = false |
Renders a message containing number of displayed vs. total entries.
<%= page_entries_info @posts %> #-> Displaying posts 6 - 12 of 26 in total
The default output contains HTML. Use ":html => false" for plain text.
Returns HTML representing page links for a WillPaginate::Collection-like object. In case there is no more than one page in total, nil is returned.
All options not recognized by will_paginate will become HTML attributes on the container element for pagination links (the DIV). For example:
<%= will_paginate @posts, :style => 'color:blue' %>
will result in:
<div class="pagination" style="color:blue"> ... </div>