Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

wearewondrous/fractal-twig-drupal-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twig Adapter

An adapter to let you use Twig templates with Fractal.

Installation

$ npm install --save @wondrousllc/fractal-twig-drupal-adapter

in your fractal.js

const fractal = require('@frctl/fractal').create(); const twigAdapter = require('@wondrousllc/fractal-twig-drupal-adapter'); const twig = twigAdapter({ handlePrefix: '@components/', });

Usage

This adapter allows you to use some drupal filters, functions and tags.

Supported Filters

|t - The Drupal core translation filter. Additional parameters not supported, yet.

|field_value - Provided by the module drupal/twig_field_value to use plain outputs from a field.

Supported Functions

path() - The Drupal core path function.

url() - The Drupal core url function.

block_view() - Provided by the module drupal/twig_extender to directly print a block.

Supported tags

{% trans %} - The Drupal core translat tag.

Creator

WONDROUS Ltd

MIT License

About

Twig template adapter for Fractal with Drupal 8 directives.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •