neocasta
(Pk)
1
Hi everybody
I have nested tree with rubrics structure
i want url like:
http://site.local/rubric1/subrubric11/subsubrubric111/.../
I trying
'rules'=>array(
'<structure:.*>'=>'structure/list'),
But it overrides default rules like
http://site.local/controller/action etc
Any ideas?
snnwolf
(Wolf Nick)
2
Задача интересная. Сам сейчас над такой думаю. Но пока, что кроме своего контроллера с разбором урла
alexjay
(A Jilkin)
3
I’ve used prefix to solve this, so we have URL pattern:
"somePrefix/<structure:.*>" => "data/list"
URLs will looks like:
http://some.domain/somePrefix/bread/crumbs/
in the controller we split "structure" into nodes
$nodes = explode('/', Yii::app()->request->getParam('structure'));