[+BUGFIX] Fluid (Core): Putting form fields in partial now works as expected. Resolve...
authorSebastian Kurfürst <sebastian@typo3.org>
Fri, 18 Jun 2010 09:19:33 +0000 (09:19 +0000)
committerSebastian Kurfürst <sebastian@typo3.org>
Fri, 18 Jun 2010 09:19:33 +0000 (09:19 +0000)
typo3/sysext/fluid/Classes/View/TemplateView.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php

index 6e4cb1a..66ed697 100644 (file)
@@ -318,15 +318,19 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
         * @param string $partialName
         * @param string $sectionToRender
         * @param array $variables
+        * @param Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer the View Helper Variable container to use.
         * @return string
         * @author Sebastian Kurfürst <sebastian@typo3.org>
         * @author Bastian Waidelich <bastian@typo3.org>
         * @author Robert Lemke <robert@typo3.org>
         */
-       public function renderPartial($partialName, $sectionToRender, array $variables) {
+       public function renderPartial($partialName, $sectionToRender, array $variables, $viewHelperVariableContainer = NULL) {
                $partial = $this->parseTemplate($this->resolvePartialPathAndFilename($partialName));
                $variableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $variables);
                $renderingContext = $this->buildRenderingContext($variableContainer);
+               if ($viewHelperVariableContainer !== NULL) {
+                       $renderingContext->setViewHelperVariableContainer($viewHelperVariableContainer);
+               }
                return $partial->render($renderingContext);
        }
 
index 8e1e4e5..5d3aa66 100644 (file)
@@ -43,7 +43,7 @@ class Tx_Fluid_ViewHelpers_RenderViewHelper extends Tx_Fluid_Core_ViewHelper_Abs
         */
        public function render($section = '', $partial = '', $arguments = array()) {
                if ($partial !== '') {
-                       return $this->viewHelperVariableContainer->getView()->renderPartial($partial, $section, $arguments);
+                       return $this->viewHelperVariableContainer->getView()->renderPartial($partial, $section, $arguments, $this->viewHelperVariableContainer);
                } elseif ($section !== '') {
                        return $this->viewHelperVariableContainer->getView()->renderSection($section);
                }