I'm building a system where the admin can edit email templates stored in the database. I would like to use volt as the templating engine for the emails but I can't figure out how to use view engine or the volt compiler to render a template stored in a string instead of a file. Is this possible? Basically I would like to do something like:
$this->view->purchase = PurchaseModel::findFirst($id);
$body = $this->view->renderString(
"Thanks for your purchase, you can find the details here: {{ static_url(purchase.getUrl()) }}"
)