CUrlManager - configure routers to generate proper links with parameters

Hi,

I’m using “static” pages quite intensely.

I’d like to shorten their links, so instead of /site/page/view/experience I’d like to have /our-experience

I’ve tried the following rule




'our-experience' => 'site/page/view/experience',



and




'our-experience' => array('site/page', 'view' => 'experience')



Unfortunately, none of them makes CHtml::link function to generate the “proper” (shortened) link - instead it’s always the full ugly-looking path.

What is the solution?

Try




'our-experience' => array('site/page', 'defaultParams' => array('view' => 'experience')),



I would prefer the shorter and (IMO) better readable alternative syntax. You can also specify different values for the view parameter.


'our-<view:(experience|products)>'=>'site/page';

Hi,

There is any way to add a default value to all generated links in the website, in both situations (get and path)?

Thanks,

Paul