kalamuna/twig-drupal-filters

Name: twig-drupal-filters

Owner: Kalamuna

Description: Twig.js implementations of Drupal's Twig filters

Created: 2016-11-22 18:57:53.0

Updated: 2017-06-21 15:20:49.0

Pushed: 2018-02-19 08:55:04.0

Homepage: null

Size: 25

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Twig.js Drupal Extensions

Greenkeeper badge Build Status

Twig.js implementations of Drupal's Twig functions and filters. Most of these are just stubbed creations from John Albin's work in KSS-Node.

Usage
Twig = require('twig')
twigDrupal = require('twig-drupal')

dd the filters to Drupal.
Drupal(Twig);
twig
Hello World!'|clean_id }}
Filters

A comprehensive list of the filters is available here.

Functions

*These are dummy functions that don't do anything except keep Twig.js compilation from breaking when these Drupal-specific functions are used in Drupal Twig templates.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.