Commit 8d0a38e8 by Alexander Makarov

Corrected $this->render usage in template engine docs

parent a4ba2776
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment