public function saveRecord()
 {
     $text = Loader::helper('text');
     $success = false;
     $success = 'success';
     $cID = $this->post('cID');
     $c = Page::getByID($cID);
     if (trim(sprintf(PAGE_TITLE_FORMAT, SITE, $c->getCollectionName())) != trim($this->post('meta_title')) && $this->post('meta_title')) {
         $c->setAttribute('meta_title', trim($this->post('meta_title')));
     }
     if (trim(htmlspecialchars($pageDescription, ENT_COMPAT, APP_CHARSET)) != trim($this->post('meta_description')) && $this->post('meta_description')) {
         $c->setAttribute('meta_description', trim($this->post('meta_description')));
     }
     $c->setAttribute('meta_keywords', $this->post('meta_keywords'));
     $cHandle = $this->post('collection_handle');
     $c->update(array('cHandle' => $cHandle));
     $c->rescanCollectionPath();
     $newPath = Page::getCollectionPathFromID($cID);
     $newHandle = $text->urlify($cHandle);
     $result = array('success' => $success, 'cID' => $cID, 'cHandle' => $newHandle, 'newPath' => $newHandle);
     echo Loader::helper('json')->encode($result);
     exit;
 }