Adam - That's a good idea, except each stage will have a whole bunch of functions and such, not just a single one for each.
b logica - This entire area of the app runs through the contests controller, so unless I am missing something, I don't think I could use other controllers. John On Apr 3, 6:09 pm, Adam Royle <[EMAIL PROTECTED]> wrote: > I would do something like this, where getCurrentStage() returns a > string "submit" or "vote": > > function beforeFilter(){ > $currentStage = $this->Contest->getCurrentStage(); > if ($this->action != $currentStage){ > $this->setAction($currentStage); > } > > } > > function submit() { > > } > > function vote() { > > } > > Hope that helps. > > Cheers, > Adam > > On Apr 4, 5:15 am, John R <[EMAIL PROTECTED]> wrote: > > > My application is a series of "contests" with different stages > > (submission, voting, awards, etc.) > > > For each stage, the site is going to function completely differently. > > During Stage 1 (submission) for instance, you will be able to upload, > > critique, etc. The front page will be a huge list of all submissions, > > etc. During Stage 2 (voting), you will not be able to upload, only > > vote on submissions from Stage 1. etc.etc.etc.etc. > > > I am having a hard time coming up with a good method for this. The > > current stage is stored in the Contests table of the database. > > Ideally, I would like to basically have a different controller for > > each stage - so it would have it's own functions, views, etc. - but at > > the end of the day - its just a part of the contests_controller. I > > also thought of running a check for the current stage in > > beforeRender() of the contests_controller and then redirecting or > > pointing somewhere else, but I just dont know! Any feedback would be > > great! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---