Picture of Jana Kemmer
Adding custom JSON file
by Jana Kemmer - Thursday, 9 February 2017, 3:05 PM

Hello everyone, 

in our course we frequently use something that should be stored in the course.json

But since it is quite a huge section that will be treated seperate from the rest we want to create a seperate .json file just for that data. 

Is it possible to create a new json file that is on the same level as components, course etc and having it be accessible by all templates?

Help would much be appreciated.

Picture of Matt Leathes
Re: Adding custom JSON file
by Matt Leathes - Thursday, 9 February 2017, 4:56 PM

You'd have to create an extension to load it and inject the content into something like the _globals object (the object you get back from Adapt.course.get("_globals");)