Could probably be solved with a behavior in cakephp 1.2 :) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John R Sent: 3. april 2008 21:26 To: Cake PHP Subject: Re: How to manage different site instances...
Note: The ugly/obvious way to do this would be to put a switch inside every function in contests_controller that checks the stage and then either redirects if it's not that stage or w/e. I am hoping for a more glamorous option! :) On Apr 3, 2:15 pm, 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 [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 -~----------~----~----~----~------~----~------~--~---
