I have this for Tags.php as a Controller for the REST API system.
<?php
class MyControllerTags extends modRestController {
public $classKey = 'TaggerTag';
public $defaultSortField = 'sortorder';
public $defaultSortDirection = 'ASC';
}
i get {"success":true,"message":"","object":{"id":1,"tag":"Fun","label":"fun","alias":"fun","group":1,"rank":1},"code":200}
Is there a way for me to get all the results in the first call?
instead of results:
Also… a bit of a side question… how can i get intellisense or type complete / etc. Is there a tutorial or setup for IntelliIDEA or a IDE like that, do i need to run local modx with something like MAMP or a mac server so that I can get access to local php?
The table for the Tags has no field sortorder to sort by, so the query fails.
Change it to something else:
<?php
class MyControllerTags extends modRestController {
public $classKey = 'TaggerTag';
public $defaultSortField = 'tag';
public $defaultSortDirection = 'ASC';
}
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.