In a page template file,i used node_load($nid) get all the results. the following is my code.

foreach($whole as $nid){
        $node_this = node_load($nid);
        echo '<h1 class="pdtitle"><a href="#">'.$node_this->title.'</a></h1>';

if i only want to show 8 post titles on per page. how to add pagenation function to the code of the page . many thanks.

Comments

runeveryday’s picture

there is no query to node_load() how to add pagenation to it, thank you

justageek’s picture

Where do you populate $whole? Just limit the number of nodes to 8. If you want true pagination, you need to use a pagingation query, and then you have to use the theme('pager', ) function to output the pager