Yii Framework Forum: Urlmanager - Yii Framework Forum

Jump to content

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

Urlmanager Rate Topic: -----

#1 User is offline   wael 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-August 12

Posted 31 January 2013 - 06:18 AM

Hi,

i'm trying to create friendly urls
i have this kind of URL :

mysite.com/annonce/liste/pro=1&AnnonceType%5Bid%5D=31

my first route url1.html is working fine :

'url1' => array('annonce/liste/', 'defaultParams'=>array('pro'=>1), 'urlSuffix'=>'.html'),

but i can't get working the 2nd one url2.html

'url2' => array('annonce/liste/', 'defaultParams'=>array('AnnonceType%5Bid%5D'=>31), 'urlSuffix'=>'.html'),

i tried a lot of things such as replacing AnnonceType%5Bid%5D by ['AnnonceType']['id'], etc...

can anyone help me with this

thank you!
0

#2 User is offline   Luke Jurgs 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 162
  • Joined: 16-October 11
  • Location:Australia

Posted 31 January 2013 - 08:04 AM

Hi,

Does:

'url2' => array('annonce/liste/', 'defaultParams'=>array('AnnonceType' => array('bid' => 31)), 'urlSuffix'=>'.html'),


work?

Cheers

View Postwael, on 31 January 2013 - 06:18 AM, said:

Hi,

i'm trying to create friendly urls
i have this kind of URL :

mysite.com/annonce/liste/pro=1&AnnonceType%5Bid%5D=31

my first route url1.html is working fine :

'url1' => array('annonce/liste/', 'defaultParams'=>array('pro'=>1), 'urlSuffix'=>'.html'),

but i can't get working the 2nd one url2.html

'url2' => array('annonce/liste/', 'defaultParams'=>array('AnnonceType%5Bid%5D'=>31), 'urlSuffix'=>'.html'),

i tried a lot of things such as replacing AnnonceType%5Bid%5D by ['AnnonceType']['id'], etc...

can anyone help me with this

thank you!

0

#3 User is offline   wael 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-August 12

Posted 01 February 2013 - 04:27 AM

View PostLuke Jurgs, on 31 January 2013 - 08:04 AM, said:

Hi,

Does:

'url2' => array('annonce/liste/', 'defaultParams'=>array('AnnonceType' => array('bid' => 31)), 'urlSuffix'=>'.html'),


work?

Cheers


hi thanx alot
it doesn't work but
with array('id' => 31) it does
thank you !!
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