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 (Moderator: Donald Lobo) »
  • Message Template : Events - Registration Confirmation and Receipt (on-line)
Pages: [1]

Author Topic: Message Template : Events - Registration Confirmation and Receipt (on-line)  (Read 2156 times)

nmudgal

  • I post occasionally
  • **
  • Posts: 31
  • Karma: 0
    • It's Really Me
  • CiviCRM version: civicrm 3.3
  • CMS version: Drupal 6.20
  • MySQL version: mysql 5
  • PHP version: php 5
Message Template : Events - Registration Confirmation and Receipt (on-line)
April 02, 2011, 06:23:02 am
I like to access drupal username of the respective contact who has registered for any event [ obviously ] in this message template file rather than first & last name of the contact, How can I do this ? Either by making token or something?
If need to make a token [ ? ]  then in which file & how ?
Else
What exactly I have to do to achieve this ?
Any help ?
GPG Key Fingerprint: 8B97 082A D923 2860 E0BE 3ED3 8F81 0702 6AE9 2A57

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Message Template : Events - Registration Confirmation and Receipt (on-line)
April 04, 2011, 04:22:21 am
Hi,

You need to write a hook. Check this chapter  http://en.flossmanuals.net/civicrm/ch067_hooks that should explain.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Message Template : Events - Registration Confirmation and Receipt (on-line)
April 04, 2011, 02:13:37 pm
Xavier - as long as he backports api v3 can't he use {CRM api} ?
this is the api call

http://svn.civicrm.org/civicrm/trunk/api/v3/examples/UFMatchGet.php
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Message Template : Events - Registration Confirmation and Receipt (on-line)
April 04, 2011, 02:37:00 pm
Err, good point, it should work.

#civicore, is there a param somewhere to set so we can use all the features of smarty (including crmAPI) in the templates ?

Code: [Select]
{crmAPI var="UFMatchS" entity="UFMatch" action="get" version="3" contact_id="1" }
{foreach from=$UFMatchS.values item=UFMatch}
<li>{$UFMatch.uf_id}</li>
{/foreach}
X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Message Template : Events - Registration Confirmation and Receipt (on-line)
April 04, 2011, 06:01:52 pm

yes, you can use all smarty tokens in message templates

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Message Template : Events - Registration Confirmation and Receipt (on-line)

This forum was archived on 2017-11-26.