Rails 3: How will you style links to links?
The coding layout uses a link similar to
<a href="#" class="class1 class2 class3"><span>Previous</span></a> <a href="#" class="class1 class2 class3"><span>Next</span> I tried to search, and I found some possible modifications to the form of these two links. It:
<div class="pag"> <%= will_paginate @data, :page_links => false, :next_label => '' %> </div> <div class="pag"> <%= will_paginate @data, :page_links => false, :previous_label => '' %> </div> My question is: how to update the second example to the form of the first example? My problem is that these two span elements ...
thanks
+4
3 answers
It can be very simple - just add the html markup for your paginate components to the config / locales / en.yml file for example:
en: hello: "Hello world" will_paginate: previous_label: <span class="glyph glyph-prev"></span> next_label: <span class="glyph glyph-next"></span> Everything!
+5
http://thewebfellas.com/blog/2010/8/22/revisited-roll-your-own-pagination-links-with-will_paginate-and-rails-3 You can have your own formatter so that you can configure everything what you want.
+3
Wiki
en: will_paginate: previous_label: "← Previous" next_label: "Next →" page_gap: "…" https://github.com/mislav/will_paginate/wiki/I18n#translating-will_paginate-output
0