Table of Contents

JSON output in Vivvo

Vivvo CMS supports JSON output for all modules (such as box_article_list module), however this option is not enabled by default.

Registering Module

To enable JSON output, you need to register the module as URL handler first:

INSERT INTO `configuration` (
`id` ,
`variable_name` ,
`variable_property` ,
`variable_value` ,
`module` ,
`domain_id` ,
`reg_exp`
)
VALUES (
NULL , 'json', 'content_handler_function', 'json_content_handler', 'url_modules', '1', NULL
), (
NULL , 'json', 'url_handler_function', 'json_url_handler', 'url_modules', '1', NULL
), (
NULL , 'json', 'file', 'lib/vivvo/url_handlers/json.php', 'url_modules', '1', NULL
);

Example

http://www.example.com/json/box_article_list?search_cid=1

where search_cid is category ID for which the articles are outputted.