migajek
(Migajek)
1
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?
Y11
(Y!!)
2
Try
'our-experience' => array('site/page', 'defaultParams' => array('view' => 'experience')),
mikl
(Mike)
3
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';
imasia
(Paul Apostol)
4
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