Yii Framework Forum: breadcrumbs in url (urlManager) - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

breadcrumbs in url (urlManager) urls like http://site.local/rubric1/subrubric11/subsubrubric111/.. Rate Topic: -----

#1 User is offline   PauK 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 21-November 09
  • Location:region krasnodarskiy

Posted 15 December 2009 - 10:07 AM

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?
0

#2 User is offline   NickWolf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 17-December 09

Posted 17 December 2009 - 03:24 PM

View PostPaulKh, on 15 December 2009 - 10:07 AM, said:

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?

Задача интересная. Сам сейчас над такой думаю. Но пока, что кроме своего контроллера с разбором урла
0

#3 User is offline   Alex Jay 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 07-August 09

Posted 24 December 2009 - 10:45 AM

View PostNickWolf, on 17 December 2009 - 03:24 PM, said:

Задача интересная. Сам сейчас над такой думаю. Но пока, что кроме своего контроллера с разбором урла


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'));

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users