Bug #3296
override templatePath
Status: | Resolved | Start date: | 2009-05-14 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Sebastian Kurfuerst | % Done: | 100% |
|
Category: | - | |||
Target version: | - | |||
Has patch: | Affected Flow version: |
Description
override templatePath with TypoScript
History
#1 Updated by Sebastian Kurfuerst about 6 years ago
- Priority changed from Should have to Must have
- Target version changed from 1.0.0 alpha 1 to 1.0
- Branch set to v4
#2 Updated by Robert Lemke about 6 years ago
- Target version deleted (
1.0)
#3 Updated by Sebastian Kurfuerst almost 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
works now via view.templateRootPath
The workflow is as follows:
- Copy the directories "Partials" "Templates" "Layouts" from Resources/Private of your extension to a directory you choose (f.e. fileadmin/templates/BlogExample)
- set plugin.tx_blogexample.view.templatePath to filedmin/templates/BlogExample
There is NO fallback implemented, so in case no template is found, nothing is shown.
#4 Updated by Bastian Waidelich almost 6 years ago
Sebastian Kurfuerst wrote:
Two little notes:
- set plugin.tx_blogexample.view.templatePath to filedmin/templates/BlogExample
You probably want to add a TS Constant for that in your own extensions
There is NO fallback implemented
We decided that it's not useful to implement a fallback mechanism here as it would be totally confusing where to edit templates.
In most scenarios you would install the extension and copy all templates to fileadmin first.
so in case no template is found, nothing is shown.
It would be good to add a meaningful error message here, "silent errors" can be really frustrating ;)