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? -- Posted via http://www.ruby-forum.com/.
On May 18, 9:01 am, Doel Sengupta <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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/ 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> -- > Posted viahttp://www.ruby-forum.com/.
You can use :page_links => false
# ==== Options
# Display options:
# * <tt>:previous_label</tt> -- default: "« Previous"
(this
parameter is called <tt>:prev_label</tt> in versions
<b>2.3.2</b> and
older!)
# * <tt>:next_label</tt> -- default: "Next »"
# * <tt>:page_links</tt> -- when false, only previous/next links
are
rendered (default: true)
# * <tt>:inner_window</tt> -- how many links are shown around
the
current page (default: 4)
# * <tt>:outer_window</tt> -- how many links are around the
first
and the last page (default: 1)
# * <tt>:separator</tt> -- string separator for page HTML
elements
(default: single space)
> 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?
>