#

In 

# info_tag


Displaying items 201-220 of 1000 in total


info_tag provides information about the content of the current pagination.

<%== @pagy.info_tag(**options) %>
>> puts @pagy.info_tag # @pagy generated by countless/keynav doesn't have count
<span class="pagy info">Page 3 of 100</span>
=> nil

>> puts @pagy.info_tag
<span class="pagy info">Displaying items 41-60 of 1000 in total</span>
=> nil

>> puts @pagy.info_tag(id: 'the-info-tag', item_name: 'Products')
<span id="the-info-tag" class="pagy info">Displaying Products 41-60 of 1000 in total</span>
=> nil

The method also accepts a few optional keyword arguments:

  • id: 'my-info'
    • The id HTML attribute to the span tag wrapping the info.
  • item_name: 'Products'
    • The already pluralized string that will be used in place of the default item/items