Skip to content

madebyraygun/Fractal-Timber-Loader-for-WordPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timber Fractal Loader for WordPress

This plugin allows you to directly use Fractal component IDs in Timber twig templates.

Installation

This Timber Fractal Loader can be directly used as a WordPress plugin, or included with your theme.

Usage

By default the components-map.json within the theme directory is used if present. The location of the json file can be overwritten by passing it to the Loader constructor:

new TimberFractalLoader('path/to/components-map.json');

Any mapped fractal components can then be directly included via their IDs:

{% include '@button' with {
  text: 'Click here',
  url: 'https://google.com'
} only %}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages