1.4 Configuration usage
View path definitions in TypoScript
Flux will automatically look in the default template paths - even if you don't add any configuration - but you can (and indeed you should) add your View configuration as TypoScript. You do this the same way you do it for any Extbase/Fluid extension so we won't cover that here.
Provider extensions, like any Extbase extension, have template paths setup in plugin.tx_yourextwithoutunderscores.view
. Just like any other Extbase-based feature, these paths are required.
TypoScript settings for rendering
Extbase extensions, and Fluid itself, are capable of using the special TypoScript location plugin.tx_yourextwithoutunderscores.settings
as variables in your template, stored in an array called {settings}
. The same variables are also available in Controller classes as array $this->settings
. Placing options in this location gives you the easiest possible access to those variables when rendering your templates - and indeed, using a settings.
prefix for all Flux field names, enables you to _selectively override each value by using the same name you used in TypoScript settings`.
Overlays (selective template overriding)
Changing the view paths in TypoScript affects Flux just like it would affect any other extension. Flux will look in the new path instead of the old one. Here it is worth noting that you can use so-called template path "overlays" - you can read more about how these are set up, in the documentation for EXT:view about path overlays. The same procedure is supported by fluidcontent
, fluidpages
etc. - and indeed, any extension in which you use Flux gets this support without the need to install EXT:view. To get overlay capabilities for non-Flux extensions, simply install EXT:view and follow the same procedure.
Continue: Chapter 1.5: ViewHelper usage.