File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 55- [ LinkGenerator (LinkGeneratorExtesion)] ( #link-generator )
66- [ UI] ( #ui )
77 - [ Presenter] ( #presenter )
8+ - [ StructuredTemplates] ( #structuredtemplates )
89 - [ Control] ( #control )
910 - [ Component] ( #component )
1011- [ Responses] ( #responses )
@@ -36,6 +37,26 @@ Extending `BasePresenter` you can use these methods:
3637| `isModuleCurrent($module)` | `boolean` | Is current presenter in given module? |
3738| `getModuleName()` | `string` | Get current presenter module's name. |
3839
40+ # ### Structured Templates
41+
42+ Trait which modifies where are presenter templates located.
43+
44+ - Views
45+ - ` %presenterDir%/templates/%view%.latte`
46+ - Layouts
47+ - ` %presenterDir%/templates/@layout.latte`
48+ - layouts of parent presenters are also looked for
49+
50+ ` ` ` php
51+ use Contributte\A pplication\UI\Presen ter\S tructuredTemplates;
52+ use Nette\A pplication\UI\Presen ter;
53+
54+ class YourPresenter extends Presenter
55+ {
56+ use StructuredTemplates;
57+ }
58+ ` ` `
59+
3960# ## Control
4061
4162- NullControl - displays nothing
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ composer require contributte/application
3535- [ LinkGenerator (LinkGeneratorExtension)] ( https://github.com/contributte/application/blob/master/.docs/README.md#link-generator )
3636- [ UI] ( https://github.com/contributte/application/blob/master/.docs/README.md#ui )
3737 - [ Presenter] ( https://github.com/contributte/application/blob/master/.docs/README.md#presenter )
38+ - [ StructuredTemplates] ( https://github.com/contributte/application/blob/master/.docs/README.md#structuredtemplates )
3839 - [ Control] ( https://github.com/contributte/application/blob/master/.docs/README.md#control )
3940 - [ Component] ( https://github.com/contributte/application/blob/master/.docs/README.md#component )
4041- [ Responses] ( https://github.com/contributte/application/blob/master/.docs/README.md#responses )
You can’t perform that action at this time.
0 commit comments