Browse Source

docs fixed

tags/2.0.0-beta
Mark 11 years ago
parent
commit
ee5c14facb
  1. 4
      docs/guide/url.md

4
docs/guide/url.md

@ -37,8 +37,8 @@ echo \Yii::$app->urlManager->createAbsoluteUrl('blog/post/index');
The exact format of the outputted URL will depend upon how the URL manager is configured (which is the point). The above examples may also output: The exact format of the outputted URL will depend upon how the URL manager is configured (which is the point). The above examples may also output:
* `/site/page/id/about/` * `/site/page/id/about/`
* `/index.php/hi-tech`
* `/index.php?r=site/page&id=about` * `/index.php?r=site/page&id=about`
* `/index.php?r=date-time/fast-forward&id=105`
* `/index.php/date-time/fast-forward?id=105` * `/index.php/date-time/fast-forward?id=105`
* `http://www.example.com/blog/post/index/` * `http://www.example.com/blog/post/index/`
* `http://www.example.com/index.php?r=blog/post/index` * `http://www.example.com/index.php?r=blog/post/index`
@ -51,7 +51,7 @@ echo $this->createUrl('view', ['id' => 'contact']); // same controller, differen
echo $this->createUrl('post/index'); // same module, different controller and action echo $this->createUrl('post/index'); // same module, different controller and action
echo $this->createUrl('/site/index'); // absolute route no matter what controller is making this call echo $this->createUrl('/site/index'); // absolute route no matter what controller is making this call
echo $this->createurl('hi-tech'); // url for the case sensitive action `actionHiTech` of the current controller echo $this->createurl('hi-tech'); // url for the case sensitive action `actionHiTech` of the current controller
echo $this->createurl('date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` echo $this->createurl('/date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward`
``` ```
> **Tip**: In order to generate URL with a hashtag, for example `/index.php?r=site/page&id=100#title`, you need to > **Tip**: In order to generate URL with a hashtag, for example `/index.php?r=site/page&id=100#title`, you need to

Loading…
Cancel
Save