next and previous news entry link?

Asked by dorkass

Hey. Great script by the way. This could be like everything I've been looking for in a CMS. I've looked through the manual several times and played with the templates and I'm havin trouble with somethin that should be pretty simple. I need to have like one news post per 'page' and have a next and previous link available to navigate to the next and previous news post in that category. The links need to be dynamic. I'm essentially planning to use phpns as a webcomic script, through the templates. If there's no way to do next and previous through templates I'll just use php, but I figured there was some way to do this. Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
phpns Edit question
Assignee:
No assignee Edit question
Solved by:
alecwh
Solved:
Last query:
Last reply:
Revision history for this message
Best alecwh (alecwh) said :
#1

You can do this through pre-include variables, not through templates.
Use these:

$phpns['items_per_page'] = 1;
$phpns['category'] = CAT_ID; //(edit this with the category id)

Then, in the templates, you can just edit out the pagination numbers,
and just leave the previous and next buttons.

Revision history for this message
dorkass (dprkass) said :
#2

Oh wow, that's awesome, thanks for the quick response. That was incredibly simple, I should have thought of that. I'm gonna play around with this some.... This could end up being accidentally the best webcomic script out there dude.

Revision history for this message
dorkass (dprkass) said :
#3

Thanks alecwh, that solved my question.