# Will\_paginate customisation

**URL:** <https://www.ruby-forum.com/t/will-paginate-customisation/168204>\
**Category:** Rails\
**Created:** [May 18, 2009, 10:01am UTC](https://www.ruby-forum.com/t/will-paginate-customisation/168204 "2009-05-18T10:01:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [May 18, 2009, 10:01am UTC](https://www.ruby-forum.com/t/will-paginate-customisation/168204/1 "2009-05-18T10:01:00Z")

</div>

Hi,  
I am using the will\_paginate plugin for my application.  
It is showing Prevoius 1,2,3…22,23,24 Next  
but I like to have My view Page as  
First Previous Next Last instad of showing the numbers,  
How will I customise the plugin?

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [May 18, 2009, 10:28am UTC](https://www.ruby-forum.com/t/will-paginate-customisation/168204/2 "2009-05-18T10:28:56Z")

</div>

On May 18, 9:01 am, Doel S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi,  
> I am using the will\_paginate plugin for my application.  
> It is showing Prevoius 1,2,3…22,23,24 Next  
> but I like to have My view Page as  
> First Previous Next Last instad of showing the numbers,  
> How will I customise the plugin?

Take a look at the api docs for will paginate ([http://gitrdoc.com/](http://gitrdoc.com/)  
mislav/will\_paginate/tree/master/ ) will\_paginate takes various  
options that allow you to control what labels are used (or you can  
even write your own link renderer if you need even more control.

Fred

---

<div class="post-metadata">

**Author:** ![doelsengupta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cc9497/32.png) [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Post date:** [May 18, 2009, 4:23pm UTC](https://www.ruby-forum.com/t/will-paginate-customisation/168204/3 "2009-05-18T16:23:30Z")

</div>

You can use :page\_links =\> false

```
# ==== Options
# Display options:
# * <tt>:previous_label</tt> -- default: "« Previous" (this

```

parameter is called :prev\_label in versions **2.3.2** and  
older!)  
# \* :next\_label – default: “Next »”  
# \* :page\_links – when false, only previous/next links are  
rendered (default: true)  
# \* :inner\_window – how many links are shown around the  
current page (default: 4)  
# \* :outer\_window – how many links are around the first  
and the last page (default: 1)  
# \* :separator – string separator for page HTML elements  
(default: single space)
