Add a next and previous post link

Topics: Customizing Orchard, Troubleshooting
Oct 17, 2011 at 10:00 AM

Hi everybody,

On orchard, when your on the detail view of a post, is it possible to add some "next post" and "previous post" just as you can in a wordpress blog or blogengine.

Oct 17, 2011 at 4:37 PM

I think this should be a new Part, which would add those links to a currently displayed content item, based on the Content Type and Created property. Right now there is no such part in any module as I know.

Oct 18, 2011 at 8:14 PM

Interesting idea for a module. I think I'll create that.  :-)

Oct 18, 2011 at 9:20 PM

Okay, I've implemented it. I haven't published it to the gallery yet, but here's the code if you want to grab it and try it out:

I'd be curious to hear what you think.

Sebastien, do you think the committee would be interested in having this contributed to core, or better off just distributed on the gallery.

Oct 18, 2011 at 9:25 PM

This was quick !

Oct 18, 2011 at 9:38 PM

I had some time to spare and it was pretty easy. :-)

Oct 19, 2011 at 8:36 PM
Edited Oct 19, 2011 at 8:37 PM

I went ahead and posted it to the gallery. It's called Contrib.NextPrevious. Hope this is helpful.