Skip to content

Drupal 8 Module. Provides additional filters for Twig such as TruncateHTML, ...

Notifications You must be signed in to change notification settings

delcesar/twig_filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twig_Filters

twig_filters is a module for Drupal 8 which provides custom Twig filters.

Installation

  1. In modules, create a directory named custom and copy twig_filters inside. (DrupalSite/modules/custom/twig_filters)
  2. Install the module in Drupal

TruncateHtml Filter

Truncate a HTML string without breaking tags. Useful for previews or on Teaser

Usage

{{ body|truncatehtml(200)|raw }}

About

Drupal 8 Module. Provides additional filters for Twig such as TruncateHTML, ...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages