Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Issue with Prev/Next blog post buttons on single blog post page View modes: 
User avatar
Member
Member
ryan-norex - 7/4/2012 10:31:26 AM
   
Issue with Prev/Next blog post buttons on single blog post page
Hey guys,

I'm stuck with something and I could use your help. I have single pages for each blog post. At the bottom of these pages, I want to have a Next/Previous blog post links so that I can see the next/previous blog posts sorted by date.

I could probably accomplish this with a repeater that I hack around with, but the issue is that it would display the previous or next posts on the same page but with a page=x query thing. I would want it to link directly to the blog's own page without the query string.

Does anyone know of any way to accomplish this?

Thanks.

User avatar
Member
Member
ryan-norex - 7/4/2012 11:42:23 AM
   
RE:Issue with Prev/Next blog post buttons on single blog post page
Nevermind guys,

I solved it using 2 repeaters and some just where and order clauses. Then I made the next/previous buttons as the transformation.

Thanks anyway.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/5/2012 3:05:16 PM
   
RE:Issue with Prev/Next blog post buttons on single blog post page
I actually did this last week on one of my high traffic websites. I was using database functions that return the next and previous document ID for blog posts so that I could then put links to the next and previous blog posts using a custom macro method for K# in a Text/xml transformation. This caused my SQL server to use a whole processor core when I had 200 users on the site.

What I did to solve this problem was create a handler that I pass 2 query string parameters to, Forward or backwards, and the current documentID. I made the next and previous buttons point to this handler with those query string parameters so that the server didn't have to process those expensive queries on every page load, only when someone actually clicks on the link.

It works great and my SQL server CPU usage stays nice and low now.

User avatar
Member
Member
bryanallott - 7/24/2013 4:18:51 AM
   
RE:Issue with Prev/Next blog post buttons on single blog post page
Sweet! Great tip, thanks =D