gremo/zurb-ink-bundle
最新稳定版本:v4.1.0
Composer 安装命令:
composer require gremo/zurb-ink-bundle
包简介
Creating email templates is hard. This Bundle provides help.
README 文档
README
⛔ Warning ⛔ this project is now archived. It's ok to use it for legacy Symfony 2/3 projects, it should work fine. New Symfony project should use
twig/cssinliner-extraandtwig/inky-extra(see inlining CSS and use inky).
Creating email templates is hard. This Symfony Bundle provides help.
The original bundle thampe/ZurbInkBundle is abandoned. This fork aims to provide a maintained version of the original project. I use this bundle at work, on daily basis, and I respect semantic versioning.
Do you have a good idea and want to contribute? Let's do it! Feel free to open an issue.
Upgrade
- Last tag supporting Symfony 2 and 3 is 4.0.1. After that, this project only support Symfony 4 and 5.
- Latest tag of the original project is 2.2.6. You can use this release only changing your Composer requirements.
- Latest
2.xtag of my fork is 2.3.0 and contains some bug fixes. You can use this release changing your Composer requirements and bundle name in the kernel.
Installation
Install the bundle via Composer:
composer require gremo/zurb-ink-bundle
Then enable the bundle in the config/bundles.php:
<?php // config/bundles.php return [ // ... Gremo\ZurbInkBundle\GremoZurbInkBundle::class => ['all' => true], // ... ];
Usage
First we need to create a template for our HTML email. You can use Foundation for Emails and Inky or write it from scratch.
Working with Foundation for Emails and Inky
Foundation for Emails is a framework for building HTML responsive emails while Inky is a templating language that converts simple HTML tags into the complex table HTML required for emails.
Extend the base Foundation for Emails layout and override the content block:
{% extends '@GremoZurbInk/foundation-emails/base.html.twig' %} {% block content %} {# Inky markup and plain HTML #} {% endblock %} The base layout includes Foundation for Emails CSS (inlined only). Custom styles can be added overriding the stylesheets block (see Adding styles).
From scratch
Not using Foundation for Emails or Inky markup? Extend the base layout and override the body block:
{% extends '@GremoZurbInk/base.html.twig' %} {% block body %} {# Plain HTML #} {% endblock %} Custom styles can be added overriding the stylesheets block (see Adding styles).
Adding styles
Email clients typically support only a subset of valid HTML, and don’t have strong support for CSS (especially CSS in the <head> of the HTML email). Yahoo, Outlook, and even Gmail strip CSS that’s included in the <head> of your HTML, so in most cases CSS inlining is necessary.
Stylesheets can be added calling the zurb_ink_add_stylesheet Twig function inside the stylesheets block:
{# ... #} {% block stylesheets %} {{ parent() }} {# Custom CSS (inlined only) #} {{ zurb_ink_add_stylesheet('css/style.css') }} {% endblock %} {# ... #}
By default this will only inline the CSS. Pass a truthy value as second argument to both inline and output the CSS into the <style> tag:
{# ... #} {% block stylesheets %} {{ parent() }} <style type="text/css"> {# Custom CSS (both inlined and outputted) #} {{ zurb_ink_add_stylesheet('@AppBundle/Resources/public/css/style.css', true) }} </style> {% endblock %} {# ... #}
gremo/zurb-ink-bundle 适用场景与选型建议
gremo/zurb-ink-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 239.93k 次下载、GitHub Stars 达 24, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「template」 「email」 「zurb」 「ink」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 gremo/zurb-ink-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gremo/zurb-ink-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 gremo/zurb-ink-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Integrates the features of the responsive framework Foundation, from Zurb, into Symfony2 by providing templates, Twig extensions, services and commands.
TYPO3 extension for sending responsive email templates
A simple way to create breadcrumbs.
Extensible library for building notifications and sending them via different delivery channels.
Easy flash messages for Silverstripe
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
统计信息
- 总下载量: 239.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 25
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04