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 CiviMail (Moderator: Piotr Szotkowski) »
  • Store multiple versions of the token {domain.address}
Pages: [1]

Author Topic: Store multiple versions of the token {domain.address}  (Read 265 times)

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Store multiple versions of the token {domain.address}
November 17, 2014, 01:52:39 pm
Hi Folks,

The {domain.address} token is required for sending CiviMail.

I have a client where four sister organizations share the same CiviCRM installation. They don't need any of the functionality of the multisite extension except for being able to customize {domain.address} for CiviMail.

Their workaround now is to go to Administer => Communications => Organizatoin Name and Contact Info to change the org. address just before sending an email. But this is cumbersome and also makes scheduling emails problematic for fear that the value of domain.address will change between the time of scheduling and the time the email goes out.

Any better workarounds or other suggestions.

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Store multiple versions of the token {domain.address}
November 18, 2014, 02:47:36 am
Hey there,

Multisite is obviously one way to approach this, but sounds like you are ruling it out (and I have no experience with it so wouldn't want to encourage you to use it)

One thought is that you might be able to use the token hooks (http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_tokens, and http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_tokenValues).

You could use them to overwrite domain.address with the address of the employer of the person that is sending the email (and maybe validate to ensure that this employer is valid, i.e. on of the four that you have mentioned).

The only thing I am not sure about is if you can use those hooks to overwrite existing tokens (I've only ever used them to define new tokens) but if that is possible, it might work for you.

Michael




Not sure if it is possible to overwrite
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Store multiple versions of the token {domain.address}

This forum was archived on 2017-11-26.