Modules and routs

Hi all!

I'm working on a module. For now I'm using default layout template main.php, it has

                array('label'=>'Home', 'url'=>array('site/index')),

		array('label'=>'Contact', 'url'=>array('site/contact')),

		array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),

		array('label'=>'Logout', 'url'=>array('site/logout'), 'visible'=>!Yii::app()->user->isGuest)

And when I call my module index.php?r=myModuleName/myControllerName/actionName all menu links are broken, as they point to myModuleName/site/login for example.

How should I deal with that, I want my links to work correct.

I've got one solution to add slash before path e.g. /site/login  it worked, but I don't think it is quite good way, and by the way, I cant enable captcha in my module as captcha tries to load /index.php?r=myModuleName/myControllerName/captcha

I've solved problem with captcha. It was my mistake, I just didn't knew how to add captcha to page. Now I can share my knoladge )))

But question with url are still open

It's right that you prepend your application-level routes with a slash to differentiate it from other module-level routes.