Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:59:50+00:00 2026-05-24T10:59:50+00:00

I am using will_pagination with ruby 1.8.7 and rails 2.3.8 and getting pagination link

  • 0

I am using will_pagination with ruby 1.8.7 and rails 2.3.8 and getting pagination link like,

      << previous  1 2 3 4 5 6 7 8 9 ... 66 67 next >> and 
      << previous 1 2 ... 30 31 32 33 34 35 36 37 38 39 ... 66 67 next >>

Help me how to present pagination link like below,

      << previous 1 2 3 4 5 ... 66 67 next >> (or)
      << previous 1 2 ... 30 31 ... 66 67 next >>

Want to customize page links, here i like bring gap css after page 5 instead of page 9. Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:59:51+00:00Added an answer on May 24, 2026 at 10:59 am

    You can write your own LinkRenderer and pass it as the renderer option:

    will_paginate(@items, :renderer => My:LinkRenderer)
    

    Have a look at LinkRendererBase and LinkRenderer to see how the default renderer works.

    Update: Actually you don’t need to create your own renderer to achieve what you want. Customize WillPaginate like:

    WillPaginate::ViewHelpers.pagination_options[:inner_window] = 2
    WillPaginate::ViewHelpers.pagination_options[:outer_window] = 1
    

    And it will render the pagination bar like the way you want it to. You can add the initialization to an initializer file in the config/initializers folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using jruby, i want use pagination for my rails app i used
I am using Ruby 1.9.2 and Rails 3.0.3 I am consistently getting failing test
I'm using the Kaminari gem for my ruby on rails application (For anybody still
I'm using django-pagination to paginate my pages. It works great, but I would like
When using Zend_Paginator, I don't want it to show me all the pagination links.
Is there a way in Rails (using will_paginate or any other kind of pagination)
I have implemented pagination using the will_paginate plugin. I want have a drop down
I'm using the will_paginate gem for my Rails project and it's working beautifully. Unfortunately,
I am a student who will be using C++ next quarter. I really enjoyed
I'm using will_paginate for pagination, which has been working well so far, except for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.