A Simple Question About Chtml::link

Hi,

I am learning the Yii by The Yii book.

I typed an link in an view php file as following,

<?php

echo CHtml::link(‘link’, array(‘page/view’, ‘id’ => 23));

?>

and it results an link=>"http://domain.com/page/23"

Could someone give me an hint about why not "http://domain.com/page/view/23"??

Since I tried CHtml::link(‘link’, array(‘page/view_test’, ‘id’ => 23)

and it results "http://domain.com/page/view_test/23".

Any hidden rule about the "view" action?

Many thanks.

this is because you enabled urlManager to use path firmat for url and some default rules are exists in config/main.php. so check CUrlManager for more information.