betterbrief/silverstripe-jsconfig

Create a clean JavaScript data interface between your frontend and your SilverStripe application.

Maintainers

Package info

github.com/BetterBrief/silverstripe-jsconfig

Homepage

Type:silverstripe-module

pkg:composer/betterbrief/silverstripe-jsconfig

Statistics

Installs: 1 679

Dependents: 1

Suggesters: 0

Stars: 7

Open Issues: 0

v1.1.1 2016-06-26 08:23 UTC

This package is not auto-updated.

Last update: 2026-02-28 23:53:53 UTC


README

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']);