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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?
Pages: [1]

Author Topic: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?  (Read 2046 times)

bob schmitt

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
    • Expeditionary Information Systems
Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?
September 21, 2007, 05:18:57 pm
I have a client who wants the A-Z alpha pager to show up in a public profile listing.

I tried to do a simple include to have it replace the standard pager in the Profile/Listings.tpl, but it didn't work -- didn't even show up.

Is there a way I can make it work, or is there some other way to substitute an alphabetical pager instead of a number of names pager in the profile listings?

bob

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing
September 22, 2007, 02:15:25 pm
Bob - I'm pretty sure you'll have to make some code modifications to do this. However, it might not be too difficult. I know that Lobo added the AotZ bar for Groups and Mailings in 1.9 using an existing class in Utils (altho he might have generalized the class a bit from 1.8 to 1.9 - you might want to do a 'diff' before playing with this too much in 1.8).

The basic code that added this to Manage Groups in 1.9 was:
CRM/Group/Page/Group.php:        $aToZBar = CRM_Utils_PagerAToZ::getAToZBar( $dao, $this->_sortByCharacter, true );
CRM/Group/Page/Group.php:        $this->assign( 'aToZ', $aToZBar );

..be forewarned that this is based only a quick grep - so there may be reasons why this approach won't work.
...dave
Protect your investment in CiviCRM by  becoming a Member!

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: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing
September 23, 2007, 04:42:23 pm

Bob:

I made some changes in 1.9 to make this slightly easier and allow the AtoZ pager to be used in places other than contact search. You can check the 1.9 group code and see how the dao and sortByCharacter variable is set up.

You will also need to include the AtoZ pager tpl in your profile tpl.  I'm on a NZ road trip this week, so you can either send me mail and/or catch me later this week

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

bob schmitt

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
    • Expeditionary Information Systems
Re: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?
September 24, 2007, 09:02:05 am
What a nice coincidence!

It's not an immediate, absolutely pressing need, but one which will surface once I migrate their site to 5.0. Once I complete the migration, I'll install 1.9 and see if I can make that work, then get back to you.

Thanks!

Ilan

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?
December 30, 2007, 10:38:15 pm
I use joomla 1.0.13 and civicrm 1.9, and would love to have the AToZ bar on my public member listing (for a specific profile).

I tried to check the code, and "playing" with templates is one thing, but this definitively requires understanding much more of the way the system works.

As a less optimal option I tried to publish in my public area an advanced search with the parameter &force=1 but I can't find a way to create the link. All the threads I found are for dupal and I just haven't being able to translate them to joomla.

Has any body done this, or is any body able to give me pointers on where to start?

If I manage to do it, I'll happily post my solution.

Thanks
Ilan

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: Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing
December 31, 2007, 12:58:43 am

if you are a PHP programmer, you might want to check: CRM/Group/Page/Group.php (this is only on svn trunk)

and see how the AtoZ pager is incorporated in the manage groups page. its a wee bit more complex on the profile page

we can assist u on irc if u have any questions etc. a patch to enable this would be a great contribution :)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Template question: Can I use /CRM/common/pagerAToZ.tpl in my profile listing?

This forum was archived on 2017-11-26.