News

A single fix: fatal error in the view xml/xsd (was not including the required template.php file)

Added a template operator: $obj | to_array( $level=2, $attributes=array() )
It allows encoding to php array any ezpersistentobject (ie. all the 'objects' in
the online manual http://ez.no/doc/ez_publish/technical_manual/4_x/reference/objects)
It is useful for data export as well as using json_encode / xml_encode from ezjscore.
example usage: {json_encode($current_user|to_array(1))}
The 1st param is the nesting level used for sub-objects (same as |attribute() does).
The 2nd param, if non empty, is a filter on the attributes of $obj that will be
returned (note: it is not applied recursively).

The initial version provides templates to build json and xml views of your content.

A "single-node" and a "recursive node-tree" template are provided for both protocols.

Most datatypes (but not all yet) have the proper templates, too.

Generation of the xsd definition corresponding to the existing content classes works, with some datatypes (but not all) supported.

Usage of the layout/set module to get the proper "contet-type" header is not necessary, as a template operator that sends http headers is included. This means that the override system can be used to get a json or xml representation as defualt view of a node.