The Zegami client loads data in the following sequence:
- The index.html page with javascript and css is loaded by the browser
Zegami.start
is called and expects a div withclass="zegami-container"
to exist in the body.Zegami.start( config );
Config can either be provided as a javascript object. Alternatively, if the config object contains a field called configUrl, the config will be fetched as a json from this url.- The config endpoint or file is called if applicable, and the config is loaded into Zegami.
- The data is downloaded from the dataUrl specified by the config
- The XSLT for Zegs is downloaded from the zegXsltUrl specified in the config
The first step in customising the data in Zegami is to open the index.html file and point it at the locations where a config file is to be loaded. If you are offering multiple views on the data or different datasets per user then this endpoint needs to be dynamic.
The dynamic endpoint could be implemented either at the API level – each user gets a different config or at the HTML level – each user gets a templated html file. Alternatively, the dataUrl could be dynamic and the config static.