Help - Search - Members - Calendar
Full Version: Prev 20/Next 20
Movable Type Community Forum > Additional Resources > Tips and Tricks
bmk
We were talking about this here, maybe that will help you out.
tqh
Hi...

I didn't figure out how to make links like Prev 20 / Next 20 ... in Archive Index pages (main, category, individual ...) ...like List & Edit Entries in MT... or pages like 1, 2, 3 ...

(because in my case I have list of entries-articles and I don't want to keep date based archives, but by categories and main index pages have too many entries)

Do you smart people here have any suggestion to me?

(sorry for my english :-))
grh
Gidday -

I've also been trying to nut-out an answer to this question for a few days, but I'm not having any luck! I followed BMK's link but couldn't find an answer there.

I'm trying to create an index of only 15 entries or so per page, with Next/Prev links to the next/previous 15 entries. Each item would be a title only, so that users don't have to scroll through an entire entry to get to the next one. (Each title links to the full entry in a popup window).

I hope this all makes sense. I've been struggling with this for a while and any help would be appreciated!

cheers
Greg huh.gif
bmk
Greg, .

Ben & Mena put us on this fast new rockin' server and the links are
different now.  Apologies for the confusion!

There's a link in the other thread to the page I have set up like this.  Scroll down to the bottom of that and you'll see the [ Previous Page ] [ Next Page ]  links.    It adds the ?page=2 to the URL and pulls the entries dynamically.  One template.

You need to be using the mysql backend to use queries like this.
grh
cheers bmk. that puts things in a WHOLE different perspective!  I should be able to nut it out now.

thanks again
Greg biggrin.gif
bmk
Post back if you have any questions!  :)
grh
Hey BMK - I have another question...

I've been looking at your php script for adding prev/next, in that discussion you sent through before, and can't figure out what file this section of code is referring to:

CODE
include ("YOUR CONNECTION FILE");


Sorry, I'm a newbie when it comes to php. If you could explain it'd be much appreciated!

cheers
Greg
bmk
It's the code part that makes the connection to your database.  I store that section as a separate file and include in all the scripts that need it.  You could just as easily replace that include line with the code instead of including it like that.  Fill it out pretty much the same way as you did the MT mysql connection:
CODE
<?
$database = "name of your database";
$db = mysql_connect("domain", "username", "password");
mysql_select_db("$database",$db);
?>


Brenna
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.