There are two ways of referencing views in `include` and `extends` statements:
There are two ways of referencing templates in `include` and `extends` statements:
```
{% include "comment.twig" %}
...
...
@@ -118,8 +118,8 @@ There are two ways of referencing views in `include` and `extends` statements:
{% extends "@app/views/layouts/2columns.twig" %}
```
In the first case the view will be searched relatively to the path current view is in. For `comment.twig` and `post.twig`
that means these will be searched in the same directory as the view that's rendered currently.
In the first case the view will be searched relatively to the current template path. For `comment.twig` and `post.twig`
that means these will be searched in the same directory as the currently rendered template.
In the second case we're using path aliases. All the Yii aliases such as `@app` are available by default.
...
...
@@ -264,8 +264,9 @@ Then in the template you can apply filter using the following syntax:
Smarty
------
To use Smarty, you need to create templates in files that have the `.tpl` extension (or use another file extension but configure the component accordingly). Unlike standard view files, when using Smarty you must include the extension in your `$this->render()`
or `$this->renderPartial()` controller calls:
To use Smarty, you need to create templates in files that have the `.tpl` extension (or use another file extension but
configure the component accordingly). Unlike standard view files, when using Smarty you must include the extension in
your `$this->render()` or `$this->renderPartial()` controller calls:
$this->assertEquals(1,preg_match('#<script src="/assets/[0-9a-z]+/jquery\\.js"></script>\s*</body>#',$content),'Content does not contain the jquery js:'.$content);
$this->assertEquals(1,preg_match('#<form id="login-form" class="form-horizontal" action="/form-handler" method="post">.*?</form>#s',$content),'Content does not contain form:'.$content);