• MODX.com

    3,538 downloads

SIMPLX Widgeteer

SIMPLX Widgeteer is an extra by larscwallin, first released on 2011-04-29.

Package Description

Integrate and Mashup the easy way!

More and more data on the web, as well as on local systems, are available through descriptive formats as xml and json. Such formats can be used to display data from other systems, such as news updates etc.

Displaying, or rendering, information in a json feed takes parsing of the json data, extracting relevant data and inserting this data into some kind of template document. This is where the Widgeteer steps in and keeps it SIMPLX!

The Widgeteer takes a very pleasent Modxish way to accomplish this: chunkMatching.

Consider the following json string:

----------------------------------------------------------------------------------------------------------------------

{  
   "source":"modx", 
   "result":[ 
      {"id":"1","type":"document","pagetitle":"JSON Test","description":"Simple demo of json"},                        {"id":"2","type":"document","pagetitle":"JSON Test 2","description":"Simple demo of json 2"} 

 ]
}

----------------------------------------------------------------------------------------------------------------------

This is a very simplified json representing two pages in ModX.

First of all, as soon as you spot the char "{" its the start of a new json object representation. Consequently "}" finishes an object.

The first object in the json string above only has two attributes: "source", "result". "source" has the value "modx". The "result" attribute though is followed by "[". This sign represents the start of an array of json objects, in this case ModX documents. Widgeteer calls the "result" attribute "dataSetRoot", in other words the element which holds the array of data we want to render.

Usage/Installation Instructions

Install using Package Management as usual.

This is what you end up with after the install:

  • A new simplx widgeteer category (possibly/hopefully with substructures)
  • Under Templates you will find one new template called Widgeteer examples which contains further info and samples.
  • Under Chunks you find sample Chunks, all called widgeteer_*_* something. These are the templates and datasets.
  • Under Snippets you find, of course, the simplx_widgeteer itself; you also find two preprocessor Snippets
  • In your assets/ folder you will have a new snippets folder in which you will find the xml2json folder/files. This makes it possible to get xml from a Web Service and easily convert it to json.

Have fun :)

Lars

Details

Developer(s)
larscwallin
Released
2011-04-29
First seen
2011-04-29
License
GPLv2
Supported databases
Minimum MODX Requirement
2.0

SIMPLX Widgeteer Releases

Vendor Signature Released on
MODX.com 0.8.5-PL 2014-10-28 (11 years ago)
MODX.com 0.6.5-rc1 2011-04-29 (14 years ago)

We've also seen 1 unverified versions of SIMPLX Widgeteer in use, but don't list those as we've been unable of confirming they are official releases from an official source.