I just remove the model from $uses in TemplateController for debugging
purpose.
Seems like the controller only works with singular

for $domain,
$domains = explode(".",$_SERVER["HTTP_HOST"]);




On Fri, Apr 8, 2011 at 5:08 PM, cricket <zijn.digi...@gmail.com> wrote:

> On Fri, Apr 8, 2011 at 7:55 PM, cake-learner <sh.koiz...@gmail.com> wrote:
> > I have following Controller and Model set up manually since the baker
> > is not so easy to use.
> > But somehow I can't get to work. First of all, about the class name, I
> > am not sure why they want to use singular for model and plural for
> > controller
>
> A model represents a single entity. So, singular. A controller handles
> collections of entities (in a sense). So, plural.
>
> > and small letters for routes.php. It's been nightmare with cakephp
> > project for last 5 months.
> >
> > class TemplatesController extends AppController {
> >  $name = "Templates";
> >  function index(){
> >  }
> > }
>
> If you're using PHP 5.x you can leave out $name here.
>
> > class Template extends exends Model{
> >  $name = "Template";
> > }
>
> Typo? And it's AppModel.
>
> class Template extends AppModel
>
> Ditto about $name here.
>
> > Router::connect('/template_page/:id',array('controller'=>templates',
> > 'action' => 'index',  'client'=>$domains[0]) );
>
> I don't understand what $domains is so no comment.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to