Fork me on GitHub
DNN Apps - Demo-Zone
Discover DNN-Apps - simple and elegant, easy to customize
You are here: Home  >  Apps  >  JS API and JSON Demos

Simple Example with the JS-API & Tokens

The JS API allows you to use 2SexyContent data in your JavaScript with minimal plumbing. Here's how it works:

  1. Enable / disable publishing of data (this is done in the template settings, default is disabled for security reasons)
  2. A client side JS-API which takes care of all the data x-fer and ensures that the client receives a clean representation of the data as a JS-object
  3. The client-side API has a syntax and functionality very close to that of the Razor-API

Download the App to experiment with this yourself.

  1. {{ item.Question }}

  1. {{ item.Question }}

Examples with many different Technologies

The following examples do the same thing, with 5 different technologies

  1. Token Templates
  2. Razor Templates
  3. jQuery Templates
  4. knockoutJS Templates
  5. AngularJS Templates

Error Showing Content - please login as admin for details.

  1. {{ item.Question }}
2serve . 2invent . 2create is 2be.