@baris thanks, that is exactly what I looked for:
var userProvidedCatIds = widget.data.catIds; if (!userProvidedCatIds || userProvidedCatIds === '0') { categories.getCategoriesByPrivilege('cid:0:children', widget.uid, 'find', render); } else { categories.getCategories(userProvidedCatIds.split(',').map(Number), widget.uid, render); } function render(err, data) { app.render('categories.tpl', { categories: data, relative_path: nconf.get('relative_path') }, function (err, html) { widget.html = html; callback(err, html); }); }Is there any doc-site / rtfm for the JS-API or do we have to look at the source to find appropriate methods and their parameters?