Hot answers tagged

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

For the use case where the email is sent from a logged in user, one could use the function CRM_Core_Session::singleton()->getLoggedInContactID() to get the logged in contact ID. This would fall down for those cases where the email is generated by a 'system call', e.g. an email that was triggered by a cron job, but that might not be a deal breaker for your ...


2

You can use smarty to get contact details of the target of the activity. https://civicrm.stackexchange.com/a/31516/8748 snippet: {if $contact.activity_id} {crmAPI var='activityResult' entity='Activity' action='getsingle' return="target_contact_id" id=$contact.activity_id} {crmAPI var='contactResult' entity='Contact' action='getsingle' return=&...


2

This extension could possibly help - https://civicrm.org/extensions/activity-tokens


2

The field was just not exposed and @coleman did a commit that will be active starting from version 5.39: https://github.com/civicrm/civicrm-core/pull/20558


2

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


1

If you look at the event confirmation template you'll see some sections with constructs like this: {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if} You can edit the template and include something similar for your tokens.


1

If the hooks aren't the direction you want to go, you can do this in your mail template, just you'll need to update it if the labels change or you add new values, and doesn't work well if you need more than english: {capture assign=myvar}{contact.custom_1}{/capture} {if $myvar == '1 - 10 people'}1 {elseif $myvar == '11 - 20 people'}2 ...etc... {/if}


1

According to the documentation they should look like WordPress (with Clean URLs): http://example.org/civicrm/contribute/transact?reset=1&id=IDNUMBER&{contact.checksum}&cid={contact.contact_id} WordPress (without Clean URLs): http://example.org/?civiwp=CiviCRM&q=civicrm/contribute/transact&reset=1&id=IDNUMBER&{contact.checksum}&...


1

OK, so this is a partial answer to my question - don't use CiviMail but use Scheduled Reminders instead - a reminder about a specific event will have access to tokens such as event summary, event start date, etc. so I can send a reminder to those signed up for an event and use tokens to specify the event. The reminder can be reused for other events without ...


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"}


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