Dataloader plugin for Spress

Installs: 61

Dependents: 0

Stars: 2

Watchers: 1

Forks: 2

Type: spress-plugin

v1.0.0 2014-01-11 19:34 UTC


Loads data located at _data/ folder of your site.

How to install?

Go to your Spress site and add the following to your composer.json and run composer update:

"require": {
    "yosymfony/spress-plugin-dataloader": "~1.0"

How to use?

Go to your Spress site an create _data folder. In this folder you can to create JSON that will be available in site.data.<yourFilename>.

Example with a users array:

|- blogUsers.json

In your Twig templates, you can access to this data:

{% for theme in site.data.blogUsers %}
{% endfor %}