$uuid, 'key'=>$uuid, 'slug'=>$uuid, 'title'=>$title, 'content'=>$content, 'type'=>$type ); // Get the page key by the UUID $pageKey = $pages->getByUUID($uuid); // if pageKey is empty means the page doesn't exist if (empty($pageKey)) { createPage($page); } else { editPage($page); } ajaxResponse(0, 'Save as draft successfully.', array( 'uuid'=>$uuid )); ?>