2017 © Pedro PelĂĄez
 

cakephp-plugin cakephp-zurb-inky

image

burzum/cakephp-zurb-inky

  • Wednesday, May 9, 2018
  • by burzum
  • Repository
  • 3 Watchers
  • 0 Stars
  • 291 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 268 % Grown

The README.md

CakePHP plugin for Zurb Inky

Software License Scrutinizer Coverage Code Quality, (*1)

A plugin to render Inky views. This will render HTML and CSS in a way it should work with most of the mail clients. It basically turns divs and external CSS files into very old fashioned tables and inline CSS so that the retarded mail implementations will hopefully display it correctly., (*2)

  • https://foundation.zurb.com/emails/docs/inky.html

Libraries used by this plugin, (*3)

  • https://github.com/lorenzo/pinky
  • https://github.com/MyIntervals/emogrifier

Requires php 7.1, (*4)

How to use it

Assuming you are using a custom mailer as explained here just set the view renderer for all mails of this mailer:, (*5)

class MyExampleMailer extends Mailer
{
    public function __construct(Email $email = null)
    {
        parent::__construct($email);

        $this->setViewRenderer('Burzum/ZurbInky.Inky');
    }
}

If you want to parse the CSS as inline CSS call setCssFiles() in your views., (*6)

In your layout or action set the CSS files you want to use with Inky., (*7)

$this->setCssFiles([
    'one',
    'two'
]);

The files are set using the same notation as UrlHelper::css() and are looked up in the apps webroot/css folder by default., (*8)

License

Copyright Florian KrÀmer, (*9)

Licensed under The MIT License Redistributions of files must retain the above copyright notice., (*10)

The Versions

09/05 2018
09/05 2018