Setting->findAll(); $this->data = $settings; $this->set("settings", $this->data); } function admin_update() { if(!empty($this->data)) { if($this->isCancelled()) { $this->doCancel(); } else { foreach($this->data['Setting'] as $fName => $fValue) { //echo $fName; $this->Setting->updateSetting($fName, $fValue); } //$this->redirect("/admin/settings"); } } else { $this->Session->setFlash("Direct access to that page is not allowed"); } //$this->redirect("/admin/settings"); } } ?> id = $name; return $this->find(array('label'=>$name)); } function updateSetting($page, $values) { $settingID = $this->find(array('label'=>$page)); $this->data['Setting']['id'] = $settingID['Setting']['id']; $this->id = $this->data['Setting']['id']; $this->data['Setting']['meta_title'] = $values['meta_title']; $this->data['Setting']['meta_keywords'] = $values['meta_keywords']; $this->data['Setting']['meta_desc'] = $values['meta_desc']; pr($this->data); die(); $this->save($this->data); } /* function updateSetting($name, $value) { $this->id = $name; $this->name = $name; $this->saveField("value", $value); } */ } ?>