MVC and request handling · Question 6 of 12
TypoScript contains plugin.tx_myextension.settings.itemsPerPage = 10. How do you output this value in the Fluid template of the Extbase plugin?
1 answer is correct. Easy
Show answer
Answer
- A {settings.itemsPerPage}
Explanation
Extbase merges plugin.tx_myextension.settings, plugin.tx_myextension_<plugin>.settings and the FlexForm values into one settings array. In the controller it is available as $this->settings, and for frontend plugins Extbase automatically assigns it to the template as the variable {settings}. That is why {settings.itemsPerPage} is enough, without the controller assigning anything. Fluid does not know the full TypoScript path – {plugin.tx_myextension...} would stay empty, without any error message.