# Control structure - View (or `include`) / Block There is three ways to include other views into your current view `{% view %} / {% include %}` or using `{% block %}{% endblock %}`. The order of loading depends on the order given within your directory configuration; the first file found from it will be used. ## Inline `view` (string $path, array|null $arguments = null) You must provide a valid `$path` from which the template will be loaded. If no `$arguments` are provided, defined variables from the caller's scope will be given (from `get_defined_vars()`). **[PICEA]** So, using this code: *path/base/nav.phtml* ```html ``` *path/base/nav-item.phtml* ```html {{ $item->name }}" ``` **[HTML]** Could render such as : ```html ``` ## `include` (string $path) content from external file Whenever you need to `include` a raw file from one of your view directories ## Reusable `block` (string $path, ...$arguments) / `endblock` A better way to achieve this behaviour could be to create a `block` which you can define as needed. **[PICEA]** So, using this code: *path/base/nav.phtml* ```html ``` *path/base/nav-item-block.phtml* ```html {% arguments string $name, string $anchor, int $index = 0 %} {{ $name }}" ``` **[HTML]** Would render the same as the `view` example : ```html ``` ### Extending a `block` using `define` and `slot` You might need to define some custom content inside of a `block`. You can do so by using `define` and `slot`. **[PICEA]** So, using this code: *path/base/nav.phtml* ```html ``` *path/base/nav-item-block.phtml* ```html {% arguments string $name, string $anchor, int $index = 0 %} {% define "attributes" %} {{ $name }}" ``` **[HTML]** Would render the same as the `view` example : ```html ```