Browse Source

Corrected $this->render usage in template engine docs

tags/2.0.0-rc
Alexander Makarov 11 years ago
parent
commit
8d0a38e8e6
  1. 6
      docs/guide/tutorial-template-engines.md

6
docs/guide/tutorial-template-engines.md

@ -46,10 +46,10 @@ Twig
To use Twig, you need to create templates in files that have the `.twig` extension (or use another file extension but
configure the component accordingly). Unlike standard view files, when using Twig you must include the extension
in your `$this->render()` or `$this->renderPartial()` controller calls:
in your `$this->render()` controller call:
```php
echo $this->render('renderer.twig', ['username' => 'Alex']);
return $this->render('renderer.twig', ['username' => 'Alex']);
```
### Template syntax
@ -186,7 +186,7 @@ To use Smarty, you need to create templates in files that have the `.tpl` extens
or `$this->renderPartial()` controller calls:
```php
echo $this->render('renderer.tpl', ['username' => 'Alex']);
return $this->render('renderer.tpl', ['username' => 'Alex']);
```
### Additional functions

Loading…
Cancel
Save