We want to store some global variables for token substitution in civicrm. Think of adding current members of board of managers to letters or other phrases to use in mailings or pdf letters.

Example: token


should be substitued by

Jane Doe<br /> Jim Jones<br /> Bud Foo<br /> Frieda Bar<br />

Any idea how to store (editable by our staff)? Or should I misuse message templates to store the content? Say I'll create a message template "Board members (don't use as template)". Or an inactive message template?

2 Answers 2


Creating custom tokens is fairly easy in CiviCRM.

I would create a Group in CiviCRM containing the contacts of all the Board Members. By using a Group, as the Board Members change and are updated in the Group the token will automatically reflect the changes.

Then I would program a custom token that converts {board_members} to a list of the names of the contacts in the Group (separated with <br />).

The link in @Ramesh's answer should help.

You could probably kludge together a solution using templates or something similar, but it is probably more likely to break and more difficult to upkeep.

  • Okay, cool. I thought about relationships to our organization but I think you're approach is quite suitable.
    – nielo
    Commented Jul 5, 2016 at 19:46

you can create tokens to do the same job - instead of using Global variables

that would be more easier than storing in global variables - I guess

please refer to Custom fields for invoice / PDF

I guess this helps !!!

  • Sorry if I did not explain well enough. See edit.
    – nielo
    Commented Jul 5, 2016 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.