Pedro Posada | Place Pager at top and bottom of Views view.

Place Pager at top and bottom of Views view.

Posted on August 5, 2008 - 12:44am
<< 34 of 54 >>

This code helps you place the pager at top and bottom of your views.

Copy and paste this code into your template.php file.

<?php
function phptemplate_views_view($view, $type, $nodes, $level = NULL, $args = NULL){
   
$output = '';
    if (
$view->use_pager) {
       
$output .= theme('pager', '', $view->pager_limit, $view->use_pager - 1);
    }

   
$output .= theme_views_view($view, $type, $nodes, $level = NULL, $args = NULL);

    return
$output;
}
?>

Tested in drupal 4.x and 5.x

Submitted by Anonymous (not verified) on August 29, 2008 - 3:21pm.

Thanks. That worked nicely in my 5.9 install. I cross posted here: http://drupal.org/node/263587#comment-985874

Submitted by mroswell (not verified) on January 25, 2009 - 9:00pm.

This works a charm. But I'm curious why theme('views_view',...) doesn't seem to work. For instance, given the way theme functions are usually called, shouldn't this work?

theme('views_view', $view, $type, $nodes, $level = NULL, $args = NULL);

It doesn't... but why not?

Submitted by Dafold (not verified) on April 17, 2011 - 10:53pm.

Looking for information about the different breed types of a dog? Look no further, take look at www.mguploa.net to reap information about them

Dafold
www.mgupload.net

Submitted by Readers Guide (not verified) on July 1, 2011 - 6:31pm.

Just wanted to give you a shout from the valley of the sun, that you have a great piece of details, these instructions are very clear and helpful. Thanks for sharing this awesome label. Can’t wait to see what else you have.

Joseph
Readers Guide
www.vssm.org

Submitted by Mega Search (not verified) on July 13, 2011 - 7:59pm.

I really appreciate your comments. You're so intelligent and very creative in posting comments. Keep it up searching new things in life.Learning is fun, you gain more knowledge as what others did.have a great day!.

Kim
www.seapyramid.net
Mega Search

Submitted by Fatima (not verified) on July 30, 2011 - 2:11am.

Are you on the lookout for information in dealing with sibling rivalry in stepfamilies? Got information at www.10bomb how to deal with sibling rivalry. Read on

Fatima
www.10bomb.com

Submitted by code onisac test (not verified) on October 21, 2011 - 3:29pm.

Great piece of code thank you for sharing this code code onisac test

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.