Skip to content

Commit

Permalink
StructuredTemplates docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar authored and Milan Felix Šulc committed Jul 28, 2018
1 parent fa2702e commit 3426d72
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [LinkGenerator (LinkGeneratorExtesion)](#link-generator)
- [UI](#ui)
- [Presenter](#presenter)
- [StructuredTemplates](#structuredtemplates)
- [Control](#control)
- [Component](#component)
- [Responses](#responses)
Expand Down Expand Up @@ -36,6 +37,26 @@ Extending `BasePresenter` you can use these methods:
| `isModuleCurrent($module)` | `boolean` | Is current presenter in given module? |
| `getModuleName()` | `string` | Get current presenter module's name. |

#### Structured Templates

Trait which modifies where are presenter templates located.

- Views
- `%presenterDir%/templates/%view%.latte`
- Layouts
- `%presenterDir%/templates/@layout.latte`
- layouts of parent presenters are also looked for

```php
use Contributte\Application\UI\Presenter\StructuredTemplates;
use Nette\Application\UI\Presenter;
class YourPresenter extends Presenter
{
use StructuredTemplates;
}
```

### Control

- NullControl - displays nothing
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ composer require contributte/application
- [LinkGenerator (LinkGeneratorExtension)](https://github.com/contributte/application/blob/master/.docs/README.md#link-generator)
- [UI](https://github.com/contributte/application/blob/master/.docs/README.md#ui)
- [Presenter](https://github.com/contributte/application/blob/master/.docs/README.md#presenter)
- [StructuredTemplates](https://github.com/contributte/application/blob/master/.docs/README.md#structuredtemplates)
- [Control](https://github.com/contributte/application/blob/master/.docs/README.md#control)
- [Component](https://github.com/contributte/application/blob/master/.docs/README.md#component)
- [Responses](https://github.com/contributte/application/blob/master/.docs/README.md#responses)
Expand Down

0 comments on commit 3426d72

Please sign in to comment.