$this->loadModel('Taskdetail'); $ListTaskdetail = $this->Taskdetail->find('all', array( 'conditions' => array( 'Taskdetail.taskid' => $id, ) )); $this->set('ListTaskdetail', $ListTaskdetail); $this->set('taskid', $id); $this->loadModel('Notification'); $Notifications = $this->Notification->find('all', array( 'conditions' => array( 'Notification.projectid' => $tasks['Task']['projectid'], ) )); $this->set('Notifications', $Notifications);