Reputation: 981
I'm not really sure how to approach this problem. I'm generating emails via lithium and would like to inline the css styles after the view/template has fully rendered before it's displayed in the browser.
It's very simple when building the view manually, using the Emogrifier package:
$view = new lithium\template\View(array('paths' => $paths));
$raw = $view->render('all', $data, $render);
$inliner = new Pelago\Emogrifier($raw);
$inline = $inliner->emogrify();
I already have a custom Media::type()
to render the email templates (using the Inky template language).
Upvotes: 3
Views: 99