Skip to content

This plugin read a Yaml file and inject its content as a twig variable.

Notifications You must be signed in to change notification settings

denisbertrandbe/yml2twig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Craft Yml2twig

Parse a yaml file and injects its content as a twig variable.


Requirements

Installation

  1. Download the latest release of the plugin
  2. Drop the yml2twig plugin folder to craft/plugins
  3. Create a file yml2twig.yml at the root of your craft templates folder
  4. Install Yml2twig plugin from the control panel in Settings > Plugins
  5. Inside your twig template, you can load your YAML content like this : {% set var = craft.yml2twig.content %}
  6. You can access to a YAML entry like this : {{ var.yamlentry.yamlsubentry }}

Notes

You should consider to define your twig variable inside a root template and extends it. This way, your var is available inside all subtemplates.

Links

justdoweb.be © 2017 - All rights reserved

About

This plugin read a Yaml file and inject its content as a twig variable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages