jpw
jpw

Reputation: 19247

how to implement a widget that has pagination in my ruby/rails app?

Is there a way to make my rails app support a javascript widget that has previous/next buttons to page thru content in the widget?

My app contains a simple "mini-blog" feature. (Blog entries are usually less than 300 characters)

My customers need to embed their blog on their main webpage, showing the most recent 5 entries, with pagination so the person viewing at their webpage can page back to see earlier posts.

Of course, implementing a javascript widget to display JUST the most recent 5 blog entries is simple, using techniques such as found here http://www.eduvoyage.com/2008/8/3/widget-with-rails

But I do not see how to add a "previous" link inside the content that would refresh the widget contents with older entries.

Upvotes: 1

Views: 175

Answers (1)

djd
djd

Reputation: 1001

You can try cells it works on a principle that a widget area in a application can have a separate controller(not actually a controller but a cell).

Upvotes: 2

Related Questions