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) »
  • Does $location.1.email.1.email always contain the PRIMARY email?
Pages: [1]

Author Topic: Does $location.1.email.1.email always contain the PRIMARY email?  (Read 1700 times)

rob123

  • Guest
Does $location.1.email.1.email always contain the PRIMARY email?
February 13, 2008, 06:59:34 am
Hi,

I'm adding a few customisations to the ActivityLinks.tpl file and need to access the contact's primary email address.

Looking at the variable outputs for Tabbed.tpl template I see that I can access an email address at $location.1.email.1.email.

Will this location always contain the primary email?

If not, I presume I will have to setup a loop and check is_primary. (Which I don't currently know how to do in a smarty template)

Rob

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Does $location.1.email.1.email always contain the PRIMARY email?
February 13, 2008, 08:52:01 am
Yes. First location will contain primary email address.

kurund
Found this reply helpful? Support CiviCRM

rob123

  • Guest
Re: Does $location.1.email.1.email always contain the PRIMARY email?
February 13, 2008, 01:55:32 pm
Wonderful! Thanks Kurund! (and also for pointing me to the debug output on IRC :) )
« Last Edit: February 13, 2008, 01:58:28 pm by rob123 »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Does $location.1.email.1.email always contain the PRIMARY email?

This forum was archived on 2017-11-26.