Skip to content

Re-use Twig templates within Fractal.

Notifications You must be signed in to change notification settings

netzstrategen/fractal-twig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractal Twig Drupal adapter

This fork allows you to use the namespaces from your theme.info.yml file from the component-libraries key in your Fractal instance.

Requirements & Usage

Use with the Fractal integration module for Drupal:

composer require netzstrategen/drupal-twig_fractal

Setup

npm install --save git+ssh://git@github.com/netzstrategen/fractal-twig.git

or add manually in your package.json:

{
  "dependencies": {
    "@netzstrategen/fractal-twig": "git+ssh://git@github.com/netzstrategen/fractal-twig.git"
  }
}

in your fractal.js

const fractal = require('@frctl/fractal').create();
const twigAdapter = require('@netzstrategen/fractal-twig');
fractal.components.engine(twigAdapter);

Credits

This package is based on the work of https://github.com/WondrousLLC/twig-drupal