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) »
  • Smarty tokens not working in CiviMail
Pages: [1]

Author Topic: Smarty tokens not working in CiviMail  (Read 1870 times)

zayphod

  • Guest
Smarty tokens not working in CiviMail
October 09, 2009, 01:47:34 am
I am no doubt missing something from this post, and I've searched everywhere and come up with zip so I'm going to ask.
I've added the define('CIVICRM_MAIL_SMARTY', 1); to my civicrm.settings.php file, confirmed it is still there, but I still can't get special tokens to operate.
I specifically want to use a token like the one listed in the post shown here (http://civicrm.org/node/480) where they talk about the token {contribution.amount} or I'd even like to use one from the membership table {membership.end_date} but they don't populate with anything.

I can use the standard tokens such as {contacts.first_name}, but nothing else seems to work.  Can anyone point me in the right direction here?

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Smarty tokens not working in CiviMail
October 09, 2009, 02:55:38 am
hi,

These tokens value are not get replaced since these are not standard tokens and are not already registered in CiviCRM.

So I would like to do this using token hooks :
1. Register these tokens in CiviCRM.
2. Retrieve values w/ some business logic.

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmtokens
http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmtokenValues

also you might want to read more information about token hooks :
http://issues.civicrm.org/jira/browse/CRM-3712

hope this help

kiran
You Are Designed To Choose... Defined By Choice.

zayphod

  • Guest
Re: Smarty tokens not working in CiviMail
October 09, 2009, 09:20:44 am
kiran,
I will give these a read and see what I can do. Thanks for the help.

Z.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Smarty tokens not working in CiviMail

This forum was archived on 2017-11-26.