$user = $modx->getUser(); $user_id = $user->get('id'); $c->where(array( 'title:LIKE' => '%'.$term.'%', 'AND:deleted:=' => '0', 'AND:createdby:=' => $user_id, ));
This question has been answered by harveyev. See the first response.
$user_id = $modx->user->get('id'); $c->where(array( 'title:LIKE' => '%'.$term.'%', 'deleted' => 0, 'createdby' => $user_id, ));
Note: A common mistake when getting a resource is to use 'name' or 'title' instead of 'pagetitle'. Resources do not have a 'name' or 'title' field even though the caption on the Create/Edit Resource panel for the pagetitle field is 'title.'http://bobsguides.com/revolution-objects.html
Try this ('AND' is the default):
$user_id = $modx->user->get('id'); $c->where(array( 'title:LIKE' => '%'.$term.'%', 'deleted' => 0, 'createdby' => $user_id, ));
If it's an AJAX call, then a 404 error usually means that the URL to the resource containing the the snippet is not correct. Does having the snippet simply return something like "Hello" work as expected?
That's because "q" is what MODX uses for its rewrite. domain.com/index.php?q=alias