Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

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

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

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>