Create a clean JavaScript data interface between your frontend and your SilverStripe application.
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
code
.editorconfig
.scrutinizer.yml
README.md
_config.php
composer.json

README.md

JSConfig

Usage:

// Send an array of things to the frontend using JSConfig
JSConfig::add('name_of_json_key', MyObject::get()->toArray());
// Retrieve the inserted data, and use an imaginary template renderer to output some HTML based on that data set.
templateRenderer
    .setTemplate('MyObjectList')
    .process(JSCONFIG['name_of_json_key']);