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) »
  • Custom Tokens for Event Reminders
Pages: [1]

Author Topic: Custom Tokens for Event Reminders  (Read 451 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Custom Tokens for Event Reminders
July 29, 2014, 07:34:58 am
The documentation for Customized (and Custom) Tokens doesn't explain how get the Event ID for an event reminder, in order to insert a custom token based on that event.

Someone asked on the Create Your Own Tokens for Fun and Profit blog post as well, but no answer there.

Does anyone know how to do this?

Furthermore, is it correct that there is no way to preview such a reminder? I would want to check that my custom token is working.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: Custom Tokens for Event Reminders
July 29, 2014, 08:07:40 am
Try going to the scheduled reminders screen http://drupal.demo.civicrm.org/civicrm/admin/scheduleReminders?action=add&reset=1 and looking at the list of tokens there.  I think that the event tokens are only available when in event context.

Not 100% but I don't think there is preview functionality on this. I think that would be a good feature request.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Custom Tokens for Event Reminders
July 29, 2014, 08:11:25 am
Quote from: Michael McAndrew on July 29, 2014, 08:07:40 am
I think that the event tokens are only available when in event context.

Yes, those are there when in event context. The question is how to access them from hook_civicrm_tokenValues.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: Custom Tokens for Event Reminders
July 29, 2014, 08:16:57 am
ah, sorry - i didn't read your question carefully enough...
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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Custom Tokens for Event Reminders

This forum was archived on 2017-11-26.