Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reikia susikurt nauja layouta ajax.ctp ir jame idet tiktai <?php echo $content_for_layout; ?>
- i var $components = array('RequestHandler');
- function getComment($id)
- {
- $id = (int)$id;
- if ($id > 0)
- {
- $data = $this->Comment->read(null, $id);
- if (!empty($data))
- {
- $this->set('comment', $data);
- }
- else
- {
- $this->Session->setFlash('There is no such comment (maybe it was deleted)');
- $this->redirect('/');
- exit;
- }
- }
- // cia yra visa esme kuri detektina, kad uzklausa pateikta ajax'u
- if ($this->RequestHandler->isAjax())
- {
- $this->layout = 'ajax';
- }
- }
Add Comment
Please, Sign In to add comment