2017 © Pedro Peláez
 

cakephp-plugin liquid

Liquid templates for CakePHP 3

image

gourmet/liquid

Liquid templates for CakePHP 3

  • Friday, January 29, 2016
  • by jadb
  • Repository
  • 2 Watchers
  • 3 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Liquid

Build Status Total Downloads License, (*1)

Built to enable Liquid templates in CakePHP 3., (*2)

Install

Using Composer:, (*3)

composer require gourmet/liquid:~1.0

You then need to load the plugin. In boostrap.php, something like:, (*4)

\Cake\Core\Plugin::load('Gourmet/Liquid');

You can then define any controller (or email) view class like so:, (*5)

// in ProductsController.php beforeFilter
$this->viewClass = '\Gourmet\Liquid\View\View';

// passed to any email configuration as the 'viewRender' key and use it:
Email::config(['user' => ['viewRender' => '\Gourmet\Liquid\View\View']]);
$email = new Email('user');
$email->template('Hello {{ name }}', "{{ 'content' | fetch }}\n\nThis is an automated email.")
    ->to('baker@cakephp.org')
    ->viewVars(['name' => 'Baker'])
    ->send();

More documentation/filters/tags to come., (*6)

In the meantime, read more about the library this plugin wraps over here and about the liquid markup here and here., (*7)

That's it!, (*8)

Patches & Features

  • Fork
  • Mod, fix
  • Test - this is important, so it's not unintentionally broken
  • Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of their own that I can ignore when I pull)
  • Pull request - bonus point for topic branches

Bugs & Feedback

http://github.com/gourmet/liquid/issues, (*9)

License

Copyright (c)2015, Jad Bitar and licensed under The MIT License., (*10)

The Versions

29/01 2016

dev-master

9999999-dev http://github.com/gourmet/liquid

Liquid templates for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp liquid

27/03 2015
28/11 2014

v0.1.0

0.1.0.0 http://github.com/gourmet/liquid

Liquid templates for CakePHP 3

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp liquid