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) »
  • Using smarty syntax in mailing label format
Pages: [1]

Author Topic: Using smarty syntax in mailing label format  (Read 672 times)

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Using smarty syntax in mailing label format
July 25, 2011, 04:24:06 am
Hi,

Can anyone tell me if smarty syntax (IE {if}) can be used in the mailing label format setup in the admin area?

I want to optionally add the organization name to the mailing labels but only when the contact type is 'Organization' (it seems to add the display name of individuals when I add this field when it is blank which then duplicates the individuals name on the label).

The reason for wanting to do this is that we are going to use the custom addressee on organisations to address an named contact but we still want the organisation name to always show on the label.

I tried {if contact.contact_type eq 'Organization'}{contact.organization_name}{/if} but it seems as though it is putting the text on every record.

Any help would be appreciated.

Cheers,

Dave

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: Using smarty syntax in mailing label format
July 25, 2011, 04:42:31 am

No, i'm pretty sure we dont use smarty when evaluating mailing labels

however might be a good addition. Wanna investigate and submit a patch?

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

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Using smarty syntax in mailing label format
July 25, 2011, 04:54:08 am
Hi Lobo,

Thanks for the quick reply.

I'll add it to my list of things to dig into once I've got my head round the code.

I'll have to jsut add the org name into the customized addressee and have it all on the same line of the label until this feature can be added.

Thanks again,

Dave

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Using smarty syntax in mailing label format

This forum was archived on 2017-11-26.