I want to use user-friendly URLs (as described in the Yii Guide, in the
URL Management chapter), and I want to use patterns ending in "/*".
However, there is a problem with such patterns: when generating the
content that corresponds to "/*", Yii makes no guarantee about the
order of parameters.
As an example, consider the following 2 blocks of code: which differ
only in the order of the parameters.
$this->widget(
'zii.widgets.CMenu',
array(
'items'=>array(
array(
'label'=>'random label here...',
'url'=>array('a/b', 'c' => 1, 'd' => 2),
),
)
)
);
$this->widget(
'zii.widgets.CMenu',
array(
'items'=>array(
array(
'label'=>'random label here...',
'url'=>array('a/b', 'd' => 2, 'c' => 1),
),
)
)
);
Yii will produce different URLs in the two cases, even though both
URLs produce the same page.
What I would like is some way to tell the urlManager component that it
should sort the parameters by name before generating the URL.