Feature #5152
Make package settings available in view
Status: | Resolved | Start date: | 2009-10-27 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | MVC | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 6 | |||
PHP Version: | Complexity: | |||
Has patch: |
Description
to be able to write
{settings.someOption}
in your (Fluid) template, the settings should be assigned to the view after initialization.
Associated revisions
[+FEATURE] FLOW3 (MVC): Made package settings available in view. Now you can access settings directly in your Fluid template like {settings.someOption}. This resolves #5152
History
#1 Updated by Bastian Waidelich almost 6 years ago
Patch:
Index: Classes/MVC/Controller/ActionController.php =================================================================== --- Classes/MVC/Controller/ActionController.php (revision 3199) +++ Classes/MVC/Controller/ActionController.php (working copy) @@ -129,7 +129,10 @@ $this->mapRequestArgumentsToControllerArguments(); $this->view = $this->resolveView(); - if ($this->view !== NULL) $this->initializeView($this->view); + if ($this->view !== NULL) { + $this->initializeView($this->view); + $this->view->assign('settings', $this->settings); + } $this->callActionMethod(); }
#2 Updated by Karsten Dambekalns almost 6 years ago
I'd do the assign before the call to initializeView(), so that it could be overridden there, if needed.
#3 Updated by Bastian Waidelich almost 6 years ago
- Target version set to 1.0 alpha 6
#4 Updated by Bastian Waidelich almost 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r3381.