diatem-net/twig_truncate

返回截断的字符串

安装: 0

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 4

分支: 0

开放问题: 0

类型:drupal-module

1.0 2022-12-27 22:23 UTC

This package is not auto-updated.

Last update: 2024-09-19 04:18:04 UTC


README

Truncate 允许您截断一个字符串。

需求

Drupal 9.x。

安装

按照常规安装此模块。请参阅https://www.drupal.org/docs/extending-drupal/installing-modules

使用方法

参数:- n 字符数默认为150 - endchar默认为'…'

{{ the_string|truncate(100, '!') }}