Answers.Body: <p>As an alternative, you can use the <a href="https://civicrm.org/extensions/searchkit-tokens" rel="nofollow noreferrer">SearchKit Tokens</a> extension.  When you create a &quot;Tokens&quot; display, you can use Smarty to rewrite any of the token results.  You don't need Smarty enabled in CiviMail, and it's much more maintainable for non-tech staff.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-25T22:49:53.767Z
Answers.LastActivityDate: 2024-09-25T22:49:53.767Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>Performance not too much. The main downsides would be:</p>
  <ul>
  <li>It makes the templates less maintainable for other staff.</li>
  <li>You'll need to be mindful if somebody puts a <code>{</code> into the actual text, since it will get interpreted as a smarty tag.
  <ul>
  <li>Similarly if you have <code>&lt;style&gt;</code> tags you'll need to surround it with <code>{literal} .. {/literal}</code> to escape the squiggly brackets.</li>
  </ul>
  </li>
  <li>ckeditor sometimes will bork your code</li>
  </ul>
  <p>Also if you're into coding anyway, it's not that hard to make a custom token: <a href="https://docs.civicrm.org/dev/en/latest/framework/token/#defining-tokens" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/framework/token/#defining-tokens</a>. Consider doing that instead. There are also several extensions providing other tokens.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-09-25T03:24:36.550Z
Answers.LastActivityDate: 2024-09-25T03:24:36.550Z
Answers.UserDisplayName: Demerit
Body: <p>Just looking for some basic advice. Smarty logic is currently turned off for CiviMail but hoping to use it to manage more complicated data than regular tokens allow. Can't find any info on how much this might affect site and mail performance.</p>
  
Tags: <civimail><tokens><smarty><performance>
Title: Is using smarty logic in CiviMail likely to affect performance
ThreadText: # Is using smarty logic in CiviMail likely to affect performance
  
  (Asked by: username_0 on 2024-09-25)
  
  Just looking for some basic advice. Smarty logic is currently turned off for CiviMail but hoping to use it to manage more complicated data than regular tokens allow. Can't find any info on how much this might affect site and mail performance.
  
  **Tags:** civimail, tokens, smarty, performance
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-09-25. Score: 3
  
  As an alternative, you can use the [SearchKit Tokens](https://civicrm.org/extensions/searchkit-tokens) extension. When you create a "Tokens" display, you can use Smarty to rewrite any of the token results. You don't need Smarty enabled in CiviMail, and it's much more maintainable for non-username_1 staff.
  
  
  ---
  
  ### Answer by username_2 on 2024-09-25. Score: 2
  
  Performance not too much. The main downsides would be:
  
  * It makes the templates less maintainable for other staff.
  * You'll need to be mindful if somebody puts a `{` into the actual text, since it will get interpreted as a smarty tag.
    + Similarly if you have `<style>` tags you'll need to surround it with `{literal} .. {/literal}` to escape the squiggly brackets.
  * ckeditor sometimes will bork your code
  
  Also if you're into coding anyway, it's not that hard to make a custom token: <https://docs.civicrm.org/dev/en/latest/framework/token/#defining-tokens>. Consider doing that instead. There are also several extensions providing other tokens.
  
  
  ---
  
  