Skip to content

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

Notifications You must be signed in to change notification settings

BetterBrief/silverstripe-jsconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages