Commit 8d0a38e8 by Alexander Makarov

Corrected $this->render usage in template engine docs

parent a4ba2776
...@@ -46,10 +46,10 @@ Twig ...@@ -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 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 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 ```php
echo $this->render('renderer.twig', ['username' => 'Alex']); return $this->render('renderer.twig', ['username' => 'Alex']);
``` ```
### Template syntax ### Template syntax
...@@ -186,7 +186,7 @@ To use Smarty, you need to create templates in files that have the `.tpl` extens ...@@ -186,7 +186,7 @@ To use Smarty, you need to create templates in files that have the `.tpl` extens
or `$this->renderPartial()` controller calls: or `$this->renderPartial()` controller calls:
```php ```php
echo $this->render('renderer.tpl', ['username' => 'Alex']); return $this->render('renderer.tpl', ['username' => 'Alex']);
``` ```
### Additional functions ### 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