I'm using will_paginate in my rails application, it's working fine but I would like to use ul li list for my webdesigner layout. Actually with my code, it's only rendering
my view :
<div cla开发者_开发问答ss="pagination">
<ul><li><%= will_paginate @organizations %></li></ul>
</div>
My source code:
<ul><li><div class="pagination">
<span class="previous_page disabled">← Previous</span>
<em>1</em>
<a rel="next" href="/organizations?page=2&search=2&submit_search=ok">2</a>
<a href="/organizations?page=3&search=2&submit_search=ok">3</a>
<a class="next_page" rel="next" href="/organizations?page=2&search=2&submit_search=ok">Next →</a>
</div></ul>/<li>
I would like to have this kind of result :
<div class="pagination">
<ul>
<li class="prev"><a href="#"><span>Prev</span></a></li>
<li><a href="#"><span>1</span></a></li>
<li><a href="#"><span>2</span></a></li>
<li><a href="#"><span>3</span></a></li>
<li class="next"><a href="#"><span>Next</span></a></li>
</ul>
</div>
How can it be done?
The will_paginate docs link to an example that is nearly identical to what you're asking for here.
Scroll down to "Doing it Your Way."
精彩评论