I'd make them either separate controller actions or a single action that 
accepts a parameter and then tidy them up with a route. The controller function 
can then either render the view associated with the action(s), specify a view 
to render and/or specify a layout.


On 5 Aug 2014, at 20:08, Russell Lewis <russell.le...@gmail.com> wrote:

> I'm building an application that serves statistics for a local sports league. 
>  I'd like to have separate views for the data depending on if the stats are 
> form league games or tournaments or just practice.  Ideally, a user would go 
> to domain.com/tournament/ or /league/ or /practice/ and get directed 
> appropriately.  Since I want to use different layouts, views, etc for each 
> different area but the underlying Models are going to be the same no matter 
> what.  I'm curious what the CakePHP way would be to accomplish this.  My 
> thinking right now is to have separate league, tournament and practice 
> controllers that don't actually tie to models themselves but just serve to 
> encapsulate the different areas of the site.  Does that make sense?  Is there 
> a smarter way to design this?  Gotchas or issues that might arise using 
> controllers that way?
> 
> Thanks!
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to