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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customising Addresses for Labels - Ireland
Pages: [1]

Author Topic: Customising Addresses for Labels - Ireland  (Read 332 times)

AndyHarkness

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 0
    • Andy's Blog
  • CiviCRM version: 4.5.0
  • CMS version: Wordpress 4.0
  • MySQL version: 5.1.61
  • PHP version: 5.3.3
Customising Addresses for Labels - Ireland
March 24, 2014, 04:56:14 pm
Unfortunately Ireland has an odd postal system and it doesn't quite fit into the usual token structure. Here is an example of an address in full:

1 Some Street
Limerick
Co Limerick

or

1 Some Street
Clondalkin
Dublin 22
Co Dublin

Usually people just drop the "Co Limerick" or "Co Dublin" bit if the address is the same as the city. The same applies to lots of other addresses too. I'd like to automate things by using the overall rule:

If contact.city = contact.state_province_name do not print contact.state_province_name

How would I best go about this? It looks like smarty tokens/logic does not work for labels. Would I have to put together some sort of hook?
« Last Edit: March 25, 2014, 05:46:11 am by AndyHarkness »

AndyHarkness

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 0
    • Andy's Blog
  • CiviCRM version: 4.5.0
  • CMS version: Wordpress 4.0
  • MySQL version: 5.1.61
  • PHP version: 5.3.3
Re: Customising Addresses for Labels - Ireland
March 25, 2014, 01:33:39 pm
I have spent far too long trying to work this out either using Smarty (as outlined by Denim) and trying to write a hook. Failing miserably on both counts. I think I may just have to resign myself to the fact it is probably not going to happen (in the near future anyway).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customising Addresses for Labels - Ireland

This forum was archived on 2017-11-26.