Yii Framework Forum: Yii Url Paramters - ?f=V Vs. /f/v - Yii Framework Forum

Jump to content

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

Yii Url Paramters - ?f=V Vs. /f/v Rate Topic: -----

#1 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 20 February 2013 - 04:19 AM

Hi everyone,

Do you have any clue why the following only works with "non-yii"-style URLS?

On page A:

<?=CHtml::link('Link', array('edit', 'pk' => $post->primaryKey, 'returnUrl' => $this->createUrl('list')))?>


Which resolves into the URL: /post/edit/pk/311/returnUrl/%2Fpost%2Flist

PostController:

public function actionEdit( $pk = null, $returnUrl = null ) {
    var_dump($returnUrl);
}


This echoes:
string(0) ""


But if I change the URL to

/post/edit/pk/311?returnUrl=%2Fpost%2Flist

It echoes
string(25) "/admin/campaign/conflicts"


Do you have any boileplate code to handle situations like this?
0

#2 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,335
  • Joined: 21-February 11
  • Location:Greece

Posted 23 February 2013 - 04:49 PM

Hi my friend

what rules do you use in url manager? (config/main.php)

http://www.yiiframew...1/en/topics.url
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#3 User is offline   Thomas Jensen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 150
  • Joined: 01-August 09

Posted 02 March 2013 - 06:59 PM

View PostKonApaz, on 23 February 2013 - 04:49 PM, said:

Hi my friend

what rules do you use in url manager? (config/main.php)

http://www.yiiframew...1/en/topics.url


I don't use any, my "rules"-array is empty.
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