Anything present in admin/reports/dblog? The theme function itself can return an empty string. The theme_pager function though, if called, doesn't give an empty string. You must use the setQueryCount() method to limit the query, also if one page or less of data is displayed no pager is output for it either.
I am not creating a form, so I have$output .= theme('table', $table);
$output .= theme('pager');
The table displays just fine. I have dumped the output of the pager function and it is NULL.
NancyInjustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Earnie Boyd <earnie@users.sourceforge.net>
To: support@drupal.org; Ms. Nancy Wichmann <nan_wich@bellsouth.net>
Sent: Monday, October 29, 2012 1:55 PM
Subject: Re: [support] Pager Query D7
Do you have something similar to$form['pager'] = array('#value' => theme('pager'))You may also need $query->setQueryCount() instead of the addExpression http://api.drupal.org/api/drupal/includes%21pager.inc/function/PagerDefault%3A%3AsetCountQuery/7On Mon, Oct 29, 2012 at 12:20 PM, Ms. Nancy Wichmann <nan_wich@bellsouth.net> wrote:Thanks, Jamie. No difference.
$query = db_select('comment', 'c')->extend('PagerDefault')->limit($limit)->extend('TableSort');
$query->innerJoin('users', 'u', 'u.uid = c.uid');
$query->addField('u', 'name');
$query->addField('u', 'uid');
$query->addExpression('COUNT(*)', 'number');
$query->groupBy('c.uid');
$query->range(0, $limit);
$query->orderByHeader($table['header']);
$result = $query->execute();
I did look at node_admin_nodes() and don't see anything significant to tell me why theme_pager() isn't working for me.NancyInjustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Jamie Holly <hovercrafter@earthlink.net>
To: support@drupal.org
Sent: Monday, October 29, 2012 12:01 PM
Subject: Re: [support] Pager Query D7
When using extenders, the position of the extender is important. Check out:
http://drupal.org/node/508796
So make sure you have the ->extend right after your select. Then use your $query to do whatever other joins, conditions, fields, etc. you want. Put the limit in on that too.
You might want to check out node_admin_nodes() in node.admin.inc to get a better idea.
Jamie Holly http://www.intoxination.net http://www.hollyit.netOn 10/29/2012 11:49 AM, Ms. Nancy Wichmann wrote:
I have a pager query ("$query = $query->extend('PagerDefault')->limit($limit);") coded and it is working fine. However, the theme('pager') is doing nothing. It returns a null string, so I am not getting a pager on the page. I have searched all over D.O, but am apparently missing the solution.
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
--
[ Drupal support list | http://lists.drupal.org/ ]
--
[ Drupal support list | http://lists.drupal.org/ ]
--Earnie