Get Fronend Link In Backend

Hi you, i have a new problem when i implement frontend and backend base on this topid. When i am backend i want get link on front end with command Yii::app()->baseUrl and Yii::app()->createUrl(), it allways return the link on backend controller

who can help me please!!!

Dear Friend

A forward slash makes the difference.

I have a controller SampleController in both the main application and in a module.

From a module in a view.

echo CHtml::link("sampleView",array("sample/view",'id'=>$model->id));

The link will call the controller in the module.

echo CHtml::link("sampleView",array("/sample/view",'id'=>$model->id)); // take note of a forward slash at the begiining.

The link will call the controller in the main application.