承接 gourmet/liquid 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gourmet/liquid

最新稳定版本:v1.0.0

Composer 安装命令:

composer require gourmet/liquid

包简介

Liquid templates for CakePHP 3

README 文档

README

Build Status Total Downloads License

Built to enable Liquid templates in CakePHP 3.

Install

Using Composer:

composer require gourmet/liquid:~1.0

You then need to load the plugin. In boostrap.php, something like:

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

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

// 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.

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

That's it!

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

License

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

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-28