1

I'm using CiviCRM 4.6.14 and I want to write a Template for CiviMail using the smarty templating engine.
I need to add some PHP code to that template, but obvious the security setting is set to true for CiviMail so I get errors.
My temporary solution is to change the settings in the file "Smarty.class.php", but that file will be overwritten at the next update.
So is there a way, to disable the security setting in the template or any other update safe way, to disable that setting?

Thanx in advance

1

It was hard to finish reading all of your post due to the sirens that go off in my head whenever someone talks about disabling security settings.

Nevertheless, is there really something here that you can't do with a token or a hook? Please could you describe your use case a bit more?

In general, the update safe way is to overwrite core files in a custom templates extension - put it in sites/default/files/civicrm, next to extensions. (That path assumes Drupal, it'll be different in Joomla. You will need to update your resources folder in the Administer menu.

Once you've done that make sure to replicate the folder path in the templates folder. You will likely need to update this file on each CiviCRM update as part of the update procedure (if it changes in core that is).

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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