I have URL rule like this:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'' => 'site/index',
'<controller:pages>/<slug>' => '<controller>/inPage',
),
'showScriptName'=>false,
),
In action I can get slug like argument
public function actionInPage($slug)
{
echo$slug;
}
But how can I get that parameter from main controller (protected/components/controller.php) or in controller view?
Try following way framework recommended.
Yii::app()->request->getParam('slug');