Feature #5152

Make package settings available in view

Added by Bastian Waidelich almost 12 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC
Start date:
2009-10-27
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

to be able to write

{settings.someOption}

in your (Fluid) template, the settings should be assigned to the view after initialization.

#1

Updated by Bastian Waidelich almost 12 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 12 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 12 years ago

  • Target version set to 1.0 alpha 6
#4

Updated by Bastian Waidelich almost 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3381.

Also available in: Atom PDF