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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • postal/email greeting conditional options
Pages: [1]

Author Topic: postal/email greeting conditional options  (Read 1019 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
postal/email greeting conditional options
July 31, 2010, 07:28:47 am
is there any way to build conditional statements for the postal/email greeting and other tokenized fields (such as the display and sort name defaults)?

for example, i'd like to create a default postal greeting option of:

Code: [Select]
Dear {if contact.nick_name}{contact.nick_name}{else}{contact.first_name}{/if}
...which doesn't currently work.

I'm sort of assuming that the tokens are a derivative of the smarty templating, but am not sure if that's true, and if so -- where the differences are. Obviously tokens don't require the variable identifier ($). Are we just using the curly brackets because it's a nice way to define the tokens, or can we use smarty functions?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: postal/email greeting conditional options
July 31, 2010, 08:31:49 pm

Currently no

the greeting string does not get passed thru smarty

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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • postal/email greeting conditional options

This forum was archived on 2017-11-26.