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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Adjusting the search results listings for localisation
Pages: [1]

Author Topic: Adjusting the search results listings for localisation  (Read 1533 times)

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Adjusting the search results listings for localisation
December 09, 2009, 09:22:31 am
Hi everyone,
The civiCRM search listings (basic and advanced search) by default return name, address, email and phone fields as columns. I would like to modify these columns, but keep things easy for my users to use the same search links from the menu.
The main reason that I ask this, is that in the UK we use counties for postal addresses (stored in civicrm as 'state' field), but we don't abbreviate them, so none of our users understand what the abbreviated state column means. I would really like to modify this to show the full county (State) name instead.

Removing columns is easy - I can do this in the template, but I have not been able to work out how to add/modify columns to accomplish this.
I was hoping to be able to do this with hooks so that I don't have to edit core search files. I have tried the civicrm_PageRun and buildform hooks, but can't work out how to get the search rows data back to edit using these hooks. Is this possible at all, or am I barking up the wrong tree?

I have also tried a custom profile with the search, but this doesn't quite fit what I want as it changes the search fields completely.

I would be extremely grateful to anyone who can point me in the right direction. Do I need to hack some core files?

Cheers

Graham

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Adjusting the search results listings for localisation
December 09, 2009, 09:46:07 am
Ok, so I worked out how to change to the full state field by re-creating the standard fields with a profile and then linking the custom profile search from the menu - so that is ok.
However, it would still be useful to know how to modify the search columns via code/hooks so that I can add some computed columns etc.

websynapse

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 3
    • Ryan Kennedy
  • CiviCRM version: 4.3.7
  • CMS version: Drupal 6
Re: Adjusting the search results listings for localisation
July 05, 2010, 02:46:50 pm
Which template was it?

grahamgilchrist

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 3
Re: Adjusting the search results listings for localisation
July 09, 2010, 10:46:48 am
You know, I didn't edit it in the end, so I can't remember!

Off the top of my head, try:
CRM/Contact/Form/Selector.tpl

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Adjusting the search results listings for localisation

This forum was archived on 2017-11-26.