CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • is it possible to remove the pager from profile listings?
Pages: [1]

Author Topic: is it possible to remove the pager from profile listings?  (Read 626 times)

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
is it possible to remove the pager from profile listings?
December 06, 2012, 06:18:50 pm
Hi

Is it possible to remove the pager from profile search listings, and just display all the rows?

A partial solution is to use crmRowCount in the url, and set it high... but that's not a good solution.

Can I somehow do it by customizing the template files? I've tried just removing the lines where it includes the pager.tpl - that removes the pager, but it still just display the 50 first results.

Cheers
/Anders:)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: is it possible to remove the pager from profile listings?
December 06, 2012, 06:32:04 pm

pretty sure u cant do this in the template only

u can potentially also modify the code (CRM/Utils/Pager.php) and set a high value there

Note that performance and memory may not be good if u have too many rows

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: is it possible to remove the pager from profile listings?
December 06, 2012, 06:50:26 pm
Thanks Lobo - so obvious, but I didn't think of it - doh! :)
To others here's what I did:

Change the Pager.php:
changed the CONST ROWCOUNT to 100 instead of 50 - It's very often that I have between 50-100 rows.
added 'twohundred' => $this->getPerPageLink(200), to the array $this->_response
Then I also changed the templates/CRM/common/pager.tpl to include a link to display 200 rows - near the button you see the other links and I added the line: 'twohundred' => $this->getPerPageLink(200),

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: is it possible to remove the pager from profile listings?
December 06, 2012, 06:52:21 pm
Afterthought: it would be nice to have a "Display all" link in the pager.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: is it possible to remove the pager from profile listings?
December 06, 2012, 07:23:52 pm

hey anders:

couple of things:

1. Can you submit a patch and convert the ROWCOUNT const into a civicrm setting. Should be relatively easy to do and follow the standard of the other settings. Eileen and Coleman can help out on IRC

2. I'm a bit conflicted on display all link. The performance will be horrible for any reasonable sized DB, and if people click without realizing (i.e. most users), u can slow your machine down a lot. Maybe another setting that controls this, with the default to off?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

andersiversen

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 1
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: is it possible to remove the pager from profile listings?
December 07, 2012, 11:45:15 am
Hey Lobo

I agree that a "Show all" link should be a setting switched off by default, and come with a warning that it shouldn't be used for listings with a large number of rows. So I'll try and make this a setting in the "advanced settings"-accordion under profile settings - so you can switch it on/off for specific profiles.

I will look into submitting a patch after Christmas making ROWCOUNT and "Show all" link into civicrm settings.

Thanks a ton for your feedback

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • is it possible to remove the pager from profile listings?

This forum was archived on 2017-11-26.