#80 ✓resolved
Mike Stenhouse

Pagination HTML should be more semantic

Reported by Mike Stenhouse | August 16th, 2007 @ 01:18 AM

This isn't really a problem but the HTML generated for pagination could be a bit better... Using span.current is bad practice - since it doesn't carry any semantic weight. Better would be to mark up the current element with an em or a strong. A side effect of this is that you no longer need class="disabled" on the next and previous items when they're not available. Wrap 'em in a span and they can be styled independently of the current page em. That make sense?

I'd really like more options for configuring the output... I'd rather the container was a p instead of a div, for example.

I've changed my local view_helpers.rb but SQLite version issues are stopping me from fixing the tests and submitting a patch.

Comments and changes to this ticket

  • Chris Wanstrath

    Chris Wanstrath August 16th, 2007 @ 01:18 AM

    • State changed from “new” to “open”
    • Assigned user changed from “Chris Wanstrath” to “Mislav”
  • Mislav

    Mislav August 16th, 2007 @ 01:18 AM

    I'm against wrapping span.current in a (strong) emphasis, that isn't very semantic to me. The current page number does not have to be emphasized, it just has to avoid being a hyperlink.

    Putting pagination links in a paragraph (P) element is more semantic to you?

    Anyway, keep suggesting stuff. I'll keep this ticket open until I make a way for users to be able to completely customize HTML output.

  • Mislav

    Mislav December 25th, 2007 @ 04:30 AM

    Mike,

    I've made significant progress regarding customization of output. Check out the latest version of the plugin and rake rdoc to generate HTML documentation. Read about will_paginate helper in WillPaginate::ViewHelpers.

    It doesn't stop here -- i'll keep making this better.

  • Mislav

    Mislav October 8th, 2008 @ 11:10 PM

    • State changed from “open” to “resolved”
    • Tag set to html, view, will_paginate

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket

Pages