开发者

Rails rendering ul li list with will_paginate

开发者 https://www.devze.com 2023-01-06 07:41 出处:网络
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

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">&#8592; Previous</span>
<em>1</em> 
<a rel="next" href="/organizations?page=2&amp;search=2&amp;submit_search=ok">2</a> 
<a href="/organizations?page=3&amp;search=2&amp;submit_search=ok">3</a> 
<a class="next_page" rel="next" href="/organizations?page=2&amp;search=2&amp;submit_search=ok">Next &#8594;</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."

0

精彩评论

暂无评论...
验证码 换一张
取 消