Hot answers tagged

6

This is a bit tricky to answer, because there are three different token processors in CiviCRM. The Smarty processor, the legacy token processor, and the new Civi\TokenProcessor processor. Legacy Processor (aka CRM_Utils_Token) For most messages - quick emails, PDFs, etc. - you're using the legacy token processor. You can find most of these tokens in ...


4

As said by Jon its not available in core or in an extension. You can either write extension and implement hook_civicrm_tokens and hook_civicrm_tokenValues to add and generate token for the contact or you can use smarty with the help of Civi api eg: {capture assign=contactId}{contact.contact_id}{/capture} {crmAPI var='result' entity='GroupContact' action='...


4

As far as I know, that token doesn't exist, in core or in an extension. It's not a bad idea though; it would be quick to write. As with most tokens that list multiple fields, the real trick is in formatting. Some will want them in a particular order; some want them comma-separated vs. each on their own line, etc.


4

I found it myself: /civicrm/admin/setting/misc?reset=1 Default setting is 7 days.


3

I found a solution, not perfect, but it works for me: I use the $mem_status token and check if it is New. In this case I assume that it is a signup else it is a renew


3

You should be able to do this with the reltoken extension.


2

I think I can self-answer this after exploring various methods to create end of the year thank-you letters for recurring/multiple contributions - the donation tokens are not passed in the $values array, and are not otherwise easily accessible from within the hook function. In theory it may be possible to access an array of contribution data passed in the ...


2

You may want to have a look at this extenion: https://github.com/bjendres/de.systopia.newsstore It can collect/aggregate content in CiviCRM, e.g. from a RSS feed. Those items can then be sent out with CiviMail. With some additional extensions you could even sent them out automatically. I do not remember all the details and documentation is a bit sparse but ...


2

Thank you to both of you (Karin and Pete) for your suggestions : I have solved the problem. I have disabled Token and Entity Tokens Modules (and requested associated Modules) ... then reactivated : The probem comes from the Advanced User Management Module : when it is enabled, most of the tokens cannot be browsed (among which the default proposed ones in the ...


1

There's the list in the user guide: https://docs.civicrm.org/user/en/latest/common-workflows/tokens-and-mail-merge/#available-tokens It should be mostly complete.


1

Maybe the "Related Token Extension" does the trick? Even if not, it may be better to build up on an existing extension that pulls token from related contacts instead of building a new extension from the scratch. Another example for such an extension ist the "Additional Token" extension, I am pretty sure I have seen others...


1

Those are Smarty templates, and don't use regular CiviCRM tokens - which is confusing because the tokens can look the same. Fortunately, Smarty is a full-fledged templating language. You can do date formatting pretty easily. I think you want this: {$smarty.now|date_format:"%Y"}


1

If you're talking about CiviMail message templates I think this is very similar to this question, maybe even a duplicate. You need to use {capture} and then put the captured variable in your if statement.


1

If the tokens for grants are not available in core (which I can imagine) and appartently the data-processor tokens extension does not work with them either, the option you have left is to create an extension that adds them as custom tokens.


1

I found I could get the value I needed by using contribution.custom_xx[0], though I was dealing with a field with only one option. For multi-select I presume you would need a foreach to output all of the array values, or implode it into a string if you just want the contents as a list. I had tried implode but found I didn't need it, something like this ...


1

You can use Smarty in greetings handling. So first - make sure you're using the "Email Greeting" or "Postal Greeting" token instead of the "First Name" etc. tokens. Then you can do something like this: {capture assign=ln}{contact.last_name}{/capture}{if $lm ==""}{contact.custom_1}{else}{contact.last_name}{/if} See this blog post on greetings handling for ...


1

Welcome to StackExchange Helen! I am not aware of any core function that can do what you want. With a little bit of coding or manual work (import/export) you could try an approach like this: Create custom fields for the individuals that can hold organisation information Create a skript or use an extension like SQL-Tasks or CiviRules that copies all ...


1

You can do this with CiviRules. The trigger is then Case is changed. At the condition you can select Field Value Comparison to check for the right case status. At the action you select: Send E-mail to contacts on a case' It might be that you need two condition with the field value comparison, one of the old case status and one for the new case status. ...


1

Worth noting the the Extended tokens extension offers some other ones


1

Try configuring your ck editor as provided here. Thanks Pradeep


1

This token {latestcontribs.financial_type} From this extension https://civicrm.org/extensions/nzcofuzioncivitoken works for the online receipt


1

I had the same requirement (moving email templates between test and production). So I created a small extension that adds a Site URL token. You can find it here https://lab.civicrm.org/kainuk/siteurl


Only top voted, non community-wiki answers of a minimum length are eligible