tangoman/truncate-html-bundle
Composer 安装命令:
composer require tangoman/truncate-html-bundle
包简介
Symfony Truncate Html Twig Extention Bundle
README 文档
README
Tangoman TruncateHtml Twig Service truncates html keeping tags.
How to install
With composer
$ composer require tangoman/truncate-html-bundle
Enable the bundle
Don't forget to enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new TangoMan\TruncateHtml\TangoManTruncateHtml(), ); }
You don't have to add TangoMan CallbackBundle to the service.yml of your project.
twig.extension.truncate_html service should load automatically.
How to use
Inside your views:
<p> {{ post.html|truncatehtml }} </p>
Note
If you find any bug please report here : Issues
License
Copyright (c) 2018 Matthias Morin
Distributed under the MIT license.
If you like TangoMan TruncateHtml please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.
统计信息
- 总下载量: 249
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-17