Okay, so I'm working on creating a website where one of the things
people can do is add their birthdays, each day of the year is listed,
and peoples birthdays are listed inside of the views for the days as
"related birthdays" with standard bake format. Been trying forever to
figure out what I need to do to get only the birthdays to show that
I've approved though. This is the latest attempt of mine... which
seems like it should work? but obviously does not... or else I
wouldn't be on here now. Thanks in advance for any help you guys can
offer! This group has been a great help to me in the past.
<?php
class DaysController extends AppController {
var $name = 'Days';
var $helpers = array('Html', 'Form');
var $paginate = array('Day' => array('limit'=>31), 'Birthday'
=> array
('conditions' => array('Birthday.approve' => 1)));
function index() {
$this->Day->recursive = 0;
$this->set('days', $this->paginate('Day'));
}
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid Day.',
true));
$this->redirect(array('action'=>'index'));
}
$this->set('day', $this->Day->read(null, $id), $this-
>paginate
('Birthday'));
}
}
?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---