Problem with controllerMap

Hi, I’m watching controllerMap component to see how it works, but for it doesn’t :(

I have SiteController that works. mydomain.com/Site display "hello!" message

Now, I’ve added this to config/main.php:




'controllerMap'=>array(

                'node'=>array(

                'class'=>'application.controllers.SiteController',

                ),



Looking at mydomain.com/node it showa 404 error.

Why? Of course that SiteController is under protected/controllers/ dir. I’ve tried also in string way ‘node’=>‘application.controller.SiteController’ but it doesn’t work either… any hint?

tia

Danilo

I tested it and it works for me. ‘controllerMap’ should be placed outside of ‘components’.

/Tommy

Thanks Tommy, I placed inside ‘components’ and that was the error :)

I can add that also views/<controller_name> have to be renamed, so I needed to change views/site to views/node to work.