diff --git a/ChangeLog b/ChangeLog
index 43b4892fe3e774ab214114ec4c35c9a8a5c76628..0dcc3fbc5f30924c0998febd593eb1a09d59cf2c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-24  Sebastian Kurfuerst  <sebastian@typo3.org>
+
+	* Raised Fluid and Extbase version numbers to 1.3.0alpha1. See ChangeLog.txt in Extbase/Fluid for a full list of changes.
+
 2010-08-24 Steffen Gebert  <steffen@steffen-gebert.de>
 
 	* Added feature #15454: Provide a reason for logDeprecatedTypoScript()
diff --git a/typo3/sysext/extbase/ChangeLog.txt b/typo3/sysext/extbase/ChangeLog.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3e10c2ea69415fa2da6ecd41d51796b8d3092086
--- /dev/null
+++ b/typo3/sysext/extbase/ChangeLog.txt
@@ -0,0 +1,32 @@
+ChangeLog for Fluid
+===================
+
+
+Changes for 1.3.0 Alpha 1
+=========================
+
+Since the last version, the following notable things happened:
+
+* All methods trying to find an object by uid now ignore the storagePid. This changes the behavior of argument mapping and the way extbase fetches 1:1 relations. Resolves #5631. You should not experience any negative side-effects of this change, i.e. if your extension worked before, it will definitely after this change. However, it makes the record handling more robust.
+* Performance improvements in TypoScript::convertTypoScriptArrayToPlainArray. Thanks to Timo Schmidt.
+* Numerous other bugfixes, see below.
+
+Full Changes:
+-------------
+[~TASK] Extbase: Raised version number to 1.3.0-devel to reflect the version scheme defined in the wiki. Resolves #9152. Thanks Xavier for pointing to it.
+[+TASK] Extbase (MVC): cleaned up View implementations and added assign() and assignMultiple() methods to ViewInterface. This resolves #9137
+[+BUGFIX] Extbase: Fixed a small typo in extension description.
+[+BUGFIX] Extbase (Persistence): DataMapper now mapps NULL into a property on non-existing related object instead of FALSE. Resolves #8973.
+[+BUGFIX] Extbase (Reflection): getParentClass() in Tx_Extbase_Reflection_ClassReflection no longer causes a fatal error if no parent class exists. Resolves #8800.
+[+BUGFIX] Extbase (Utility): Improved performance of TypoScript::convertTypoScriptArrayToPlainArray. Thanks to Timo Schmidt. Resolves #8857.
+[~TASK] Extbase: Changed state to 'stable'. Resolves #8768.
+[+BUGFIX] Extbase: Fixed EOL and encoding of several files. Resolves #8876.
+[+BUGFIX] Extbase (MVC): Fixed a problem where a non-required action argument throwed Exception if it was not found in the Backend. Thanks to Marc Bastian Heinrichs. Resolves #7277.
+[!!!][+BUGFIX] Extbase (Persistence): All methods trying to find an object by uid now ignores the storagePid. This changes the behavior of argument mapping and the way extbase fetches 1:1 relations. Resolves #5631.
+[+BUGFIX] Extbase (Persistence): Fixed a problem where localized objects inside an aggregate are not translated. Resolves #8555.
+[~TASK] Extbase: Removed new lines at the end of php files.
+
+
+HOW TO CREATE THE CHANGELOG
+===========================
+git log [startRevision]..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "git-svn-id"
\ No newline at end of file
diff --git a/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php b/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php
index f7659e74a608ecc903d5d3abd4a3776f5ff200b3..70817e469f78cc22a7ef812d503799ef4871dd40 100644
--- a/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php
+++ b/typo3/sysext/extbase/Classes/MVC/Controller/Argument.php
@@ -378,6 +378,7 @@ class Tx_Extbase_MVC_Controller_Argument {
 	protected function findObjectByUid($uid) {
 		$query = $this->queryFactory->create($this->dataType);
 		$query->getQuerySettings()->setRespectSysLanguage(FALSE);
+		$query->getQuerySettings()->setRespectStoragePage(FALSE);
 		$result = $query->matching($query->equals('uid', $uid))->execute();
 		$object = NULL;
 		if (count($result) > 0) {
diff --git a/typo3/sysext/extbase/Classes/MVC/View/AbstractView.php b/typo3/sysext/extbase/Classes/MVC/View/AbstractView.php
index 0355df010c3c76ee7bdde7b1253f7446e8d59b5d..9d6928b0aef1c078507641a7debe8bda59ea2059 100644
--- a/typo3/sysext/extbase/Classes/MVC/View/AbstractView.php
+++ b/typo3/sysext/extbase/Classes/MVC/View/AbstractView.php
@@ -60,11 +60,11 @@ abstract class Tx_Extbase_MVC_View_AbstractView implements Tx_Extbase_MVC_View_V
 
 	/**
 	 * Add a variable to $this->viewData.
-	 * Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible,
+	 * Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
 	 *
 	 * @param string $key Key of variable
 	 * @param object $value Value of object
-	 * @return Tx_Extbase_MVC_View_ViewInterface an instance of $this, to enable chaining.
+	 * @return Tx_Extbase_MVC_View_AbstractView an instance of $this, to enable chaining
 	 * @api
 	 */
 	public function assign($key, $value) {
@@ -76,13 +76,14 @@ abstract class Tx_Extbase_MVC_View_AbstractView implements Tx_Extbase_MVC_View_V
 	 * Add multiple variables to $this->viewData.
 	 *
 	 * @param array $values array in the format array(key1 => value1, key2 => value2).
-	 * @return void
+	 * @return Tx_Extbase_MVC_View_AbstractView an instance of $this, to enable chaining
 	 * @api
 	 */
 	public function assignMultiple(array $values) {
 		foreach($values as $key => $value) {
 			$this->assign($key, $value);
 		}
+		return $this;
 	}
 
 	/**
diff --git a/typo3/sysext/extbase/Classes/MVC/View/EmptyView.php b/typo3/sysext/extbase/Classes/MVC/View/EmptyView.php
index cf13b8b9c88bb360e69a5e6437971cc3f3724971..eb1dbec29d7048dcbc0364a26847cf884d839bc2 100644
--- a/typo3/sysext/extbase/Classes/MVC/View/EmptyView.php
+++ b/typo3/sysext/extbase/Classes/MVC/View/EmptyView.php
@@ -35,6 +35,29 @@
  */
 final class Tx_Extbase_MVC_View_EmptyView extends Tx_Extbase_MVC_View_AbstractView {
 
+	/**
+	 * Dummy method to satisfy the ViewInterface
+	 *
+	 * @param string $key
+	 * @param mixed $value
+	 * @return Tx_Extbase_MVC_View_EmptyView instance of $this to allow chaining
+	 * @api
+	 */
+	public function assign($key, $value) {
+		return $this;
+	}
+
+	/**
+	 * Dummy method to satisfy the ViewInterface
+	 *
+	 * @param array $values
+	 * @return Tx_Extbase_MVC_View_EmptyView instance of $this to allow chaining
+	 * @api
+	 */
+	public function assignMultiple(array $values) {
+		return $this;
+	}
+
 	/**
 	 * Renders the empty view
 	 *
diff --git a/typo3/sysext/extbase/Classes/MVC/View/ViewInterface.php b/typo3/sysext/extbase/Classes/MVC/View/ViewInterface.php
index e33e02a0af9dc85d368ea1a17c49a21ed4a3bc5f..bdb9648f87c393fea7f03fadd314aec75f81f249 100644
--- a/typo3/sysext/extbase/Classes/MVC/View/ViewInterface.php
+++ b/typo3/sysext/extbase/Classes/MVC/View/ViewInterface.php
@@ -43,6 +43,26 @@ interface Tx_Extbase_MVC_View_ViewInterface {
 	 */
 	public function setControllerContext(Tx_Extbase_MVC_Controller_ControllerContext $controllerContext);
 
+	/**
+	 * Add a variable to the view data collection.
+	 * Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
+	 *
+	 * @param string $key Key of variable
+	 * @param object $value Value of object
+	 * @return Tx_Extbase_MVC_View_ViewInterface an instance of $this, to enable chaining
+	 * @api
+	 */
+	public function assign($key, $value);
+
+	/**
+	 * Add multiple variables to the view data collection
+	 *
+	 * @param array $values array in the format array(key1 => value1, key2 => value2)
+	 * @return Tx_Extbase_MVC_View_ViewInterface an instance of $this, to enable chaining
+	 * @api
+	 */
+	public function assignMultiple(array $values);
+
 	/**
 	 * Renders the view
 	 *
diff --git a/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php b/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php
index 2e3df34e3c41a456082d9a650b91512d0d5a4a63..232e55e69ca23ff9f52a6d0cbee80c1e4950fbc6 100644
--- a/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php
+++ b/typo3/sysext/extbase/Classes/Persistence/Mapper/DataMapper.php
@@ -343,25 +343,19 @@ class Tx_Extbase_Persistence_Mapper_DataMapper implements t3lib_Singleton {
 	 */
 	protected function getPreparedQuery(Tx_Extbase_DomainObject_DomainObjectInterface $parentObject, $propertyName, $fieldValue = '') {
 		$columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
-		$queryFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory');
 		$type = $this->getType(get_class($parentObject), $propertyName);
-		if ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_ONE) {
-			$query = $queryFactory->create($type);
-		} elseif ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_MANY) {
-			$query = $queryFactory->create($type);
-			$query->getQuerySettings()->setRespectStoragePage(FALSE);
+		$queryFactory = t3lib_div::makeInstance('Tx_Extbase_Persistence_QueryFactory');
+		$query = $queryFactory->create($type);
+		$query->getQuerySettings()->setRespectStoragePage(FALSE);
+		if ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_MANY) {
 			if ($columnMap->getChildSortByFieldName() !== NULL) {
 				$query->setOrderings(array($columnMap->getChildSortByFieldName() => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));
 			}
 		} elseif ($columnMap->getTypeOfRelation() === Tx_Extbase_Persistence_Mapper_ColumnMap::RELATION_HAS_AND_BELONGS_TO_MANY) {
-			$query = $queryFactory->create($type);
-			$query->getQuerySettings()->setRespectStoragePage(FALSE);
 			$query->setSource($this->getSource($parentObject, $propertyName));
 			if ($columnMap->getChildSortByFieldName() !== NULL) {
 				$query->setOrderings(array($columnMap->getChildSortByFieldName() => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));
 			}
-		} else {
-			throw new Tx_Extbase_Persistence_Exception('Could not determine type of relation for the property "' . $propertyName . '". This is mainly caused by a missing type declaration above the property definition. If the PHPDoc comment is there, make sure it starts with "/**" and not just with "/*".', 1252502725);
 		}
 		$query->matching($this->getConstraint($query, $parentObject, $propertyName, $fieldValue, $columnMap->getRelationTableMatchFields()));
 		return $query;
diff --git a/typo3/sysext/extbase/Classes/Persistence/Repository.php b/typo3/sysext/extbase/Classes/Persistence/Repository.php
index 8a8ca6f08d0cc91aefc2d8c22cb23575e19d0513..446bfda396f7f0c4b523e4834c08d3067563d642 100644
--- a/typo3/sysext/extbase/Classes/Persistence/Repository.php
+++ b/typo3/sysext/extbase/Classes/Persistence/Repository.php
@@ -246,6 +246,7 @@ class Tx_Extbase_Persistence_Repository implements Tx_Extbase_Persistence_Reposi
 		} else {
 			$query = $this->createQuery();
 			$query->getQuerySettings()->setRespectSysLanguage(FALSE);
+			$query->getQuerySettings()->setRespectStoragePage(FALSE);
 			$result = $query->matching($query->equals('uid', $uid))->execute();
 			$object = NULL;
 			if (count($result) > 0) {
diff --git a/typo3/sysext/extbase/Classes/Property/Mapper.php b/typo3/sysext/extbase/Classes/Property/Mapper.php
index 5644b7f437cb387e0d8155a6269a67739bf3f067..4e834e662b02d969064dbe017cfc52b82e5b2c47 100644
--- a/typo3/sysext/extbase/Classes/Property/Mapper.php
+++ b/typo3/sysext/extbase/Classes/Property/Mapper.php
@@ -317,6 +317,7 @@ class Tx_Extbase_Property_Mapper {
 	protected function findObjectByUid($dataType, $uid) {
 		$query = $this->queryFactory->create($dataType);
 		$query->getQuerySettings()->setRespectSysLanguage(FALSE);
+		$query->getQuerySettings()->setRespectStoragePage(FALSE);
 		$result = $query->matching($query->equals('uid', intval($uid)))->execute();
 		$object = NULL;
 		if (count($result) > 0) {
diff --git a/typo3/sysext/extbase/ext_emconf.php b/typo3/sysext/extbase/ext_emconf.php
index 79172cd5516a331d864a8e3a6815e60403800115..489079da89bca10d5c2ef42b7b7edcc87059b457 100644
--- a/typo3/sysext/extbase/ext_emconf.php
+++ b/typo3/sysext/extbase/ext_emconf.php
@@ -29,7 +29,7 @@ $EM_CONF[$_EXTKEY] = array(
 	'clearCacheOnLoad' => 1,
 	'lockType' => '',
 	'author_company' => '',
-	'version' => '1.2.1',
+	'version' => '1.3.0alpha1',
 	'constraints' => array(
 		'depends' => array(
 			'php' => '5.2.0-0.0.0',
diff --git a/typo3/sysext/extbase/last_synched_target b/typo3/sysext/extbase/last_synched_target
index 35608bf3547c733113522f08e9718b911d96b5c1..3b852b6e89e0dfc4a80b20cbe854fff17cfb6e9b 100644
--- a/typo3/sysext/extbase/last_synched_target
+++ b/typo3/sysext/extbase/last_synched_target
@@ -1 +1 @@
-https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/extbase/tags/1.2.1/
+https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/extbase/tags/1.3.0alpha1/
diff --git a/typo3/sysext/fluid/ChangeLog.txt b/typo3/sysext/fluid/ChangeLog.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f6988008f35455dab047163c24639752dc764c55
--- /dev/null
+++ b/typo3/sysext/fluid/ChangeLog.txt
@@ -0,0 +1,87 @@
+ChangeLog for Fluid
+===================
+
+
+Changes for 1.3.0 Alpha 1
+=========================
+
+In this release, numerous bugs have been fixed, making Fluid more stable than ever. Below are some nice features which have been introduced:
+
+* Instead of <f:form name="...">, you should now write write <f:form objectName="...">, to create an XHTML compliant form (#6521)
+
+* The <f:for>-ViewHelper has now Iteration Information available, if you want that:
+  <f:for each="{objects}" as="object" iteration="iteration">
+     {iteration.index} is a counter which starts at 0
+     {iteration.cycle} is a counter which starts at 1
+     {iteration.isEven} / {iteration.isOdd} is a boolean variable which is true if the index is even/odd
+     {iteration.isFirst} / {iteration.isLast} is a boolean variable which is true if it is the first or last element in the list.
+  </f:for>
+
+!!! Refactored all Condition-ViewHelpers like f:if, f:security.if* to use a newly created base class F3\Fluid\Core\ViewHelper\ConditionViewHelper. This greatly simplifies the implementation of custom conditions.
+  THIS IS A BREAKING CHANGE in case you copied the f:if ViewHelper to create a custom condition ViewHelper, as the internal workings changed. Please check the new f:if ViewHelper to see how to adjust your ViewHelper -- you basically just have to throw away a lot of code. Resolves #8824.
+
+* Fixed section, partial and layout rendering to function in all cases as expected now, and tested this behavior also.
+  !!! Removed renderSection() and renderWithLayout() from public API in Tx_Fluid_View_TemplateView, as this should only be called from inside Fluid.
+
+* Fixing checkbox, radio and select-ViewHelpers, but this task is not finished yet.
+  !!! The value argument is required again in form.checkbox and form.radio ViewHelpers. This is a breaking change, as the value argument has not been mandatory for a while. But it probably won't break existing templates as omitting the value makes no sense at all.
+
+* Fixed BE support of ViewHelpers (cObject, format.crop, uri.resource, format.html, image)
+
+* Negative numeric values are now properly converted to FALSE when used in boolean ViewHelper arguments.
+
+* added f:uri.image ViewHelper, working just like f:image, but returning the URL and not the full image tag.
+
+Full Changes:
+-------------
+[~TASK] Fluid: Changed version of Extbase dependency from '1.2.0-1.2.999' to '1.3.0.devel' to reflect the version scheme defined in the wiki. Relates to #9152.
+[+BUGFIX] Fluid (View): AbstractTemplateView now correctly implements F3\FLOW3\MVC\View\ViewInterface and assign() and assignMultiple() will return an instance of $this to allow chaining again like $this->view->assign()->assign()... This fixes #9090 (backported from Fluid package r4931)
+[~TASK] Fluid (Tests): committing modified AbstractFormFieldViewHelperTest that I forgot to add in previous commit
+[+TASK] Fluid (ViewHelpers): Small performance improvement in ForViewHelper: Objects will only be converted to arrays if reverse is TRUE. Relates to #8732 (backported from Fluid package r4907)
+[+TASK] Fluid (View): Added getter for template parser to AbstractTemplateView. This is useful if you want to use the parser from within your custom ViewHelper (creating a new instance would skip interceptor registration) (backported from Fluid package r4907)
+[~TASK] Fluid (ViewHelpers): Added argument "objectName" to form ViewHelper. This is now the recommended way to specify the name of the object that is bound to a form! If objectName is not specified, the name attribute will be used as object name for backwards-compatibility reasons. This resolves #6521 (backported from Fluid package r4905)
+* Raised Fluid version in trunk to 1.3.0-devel
+[+BUGFIX] Fluid (ViewHelpers): Fixed a possible security issue where the content inside the Fluid a is not properly HTML escaped.
+[+FEATURE] Fluid (ViewHelpers): Added iteration information to for ViewHelper. Thanks to all the contributors for your input and patches! This resolves #6149 (backported from Fluid package r4904)
+[~TASK] Fluid (ViewHelpers): Fresh backport from Fluid package r4899 (Mostly fixed typos. slightly improved count ViewHelper)
+[~TASK] Fluid (ViewHelpers): Replaced custom convertToArray() method by PHPs iterator_to_array() function in cycle, for and groupedFor ViewHelpers. This resolves #8732. (backport from Fluid package r4898)
+[+BUGFIX] Fluid (ViewHelpers): Now, it is possible to "unselect" checkboxes and multiselect fields in editing forms. This fixes #5638. This fixes #8535. This fixes #6897 (improved forward-backport from Fluid package r4874)
+[+TASK] Fluid (Tests): Backported FormViewHelperTest from Fluid package
+[+BUGFIX] Fluid (ViewHelpers): FormViewHelper wraps hidden fields with a div tag to create XHTML valid output. This fixes #5512 (backported from Fluid package)
+[~TASK] Fluid (ViewHelpers): Fixed BE support of the ViewHelpers cObject, format.crop, uri.resource. Relates to #8947
+[~TASK] Fluid (ViewHelpers): Added BE support in the ViewHelpers format.html and image. Relates to #8947
+[!!!][+TASK] Fluid (ViewHelpers): The value argument is required again in form.checkbox and form.radio ViewHelpers. This is a breaking change, as the value argument has not been mandatory for a while. But it probably won't break existing templates as omitting the value makes no sense at all. Relates to #8852 (backported from Fluid package r4864)
+[+FEATURE] Fluid (Core): implemented overrideArgument() method in AbstractViewHelper to be able to override previously registered arguments in subclasses. This resolves #8852 (backported from Fluid package r4864)
+[+BUGFIX] Fluid (Core): Negative numeric values are properly converted to FALSE when used in boolean ViewHelper arguments. This resolves #8893 (backported from Fluid package r4864)
+[+BUGFIX] Fluid (ViewHelpers): Reversed the rendering order of header and childNodes in be.container ViewHelper to enable child nodes to modify the pageRenderer. This resolves #8880 (thanks to Andreas Wolf)
+[+BUGFIX] Fluid: Removed leading slash from @var annotations that were backported by mistake
+[+BUGFIX] Fluid: Replaced SplObjectStorage by Tx_Extbase_Persistence_ObjectStorage to be PHP 5.2-compatible (which ships with a broken implementation of SplObjectStorage)
+[!!!][~TASK] Fluid (Core): Renamed ConditionViewHelper and TagBasedViewHelper to Abstract*ViewHelper as per CGL. (backported from Fluid package r4840). To be backwards-compatible, TagBasedViewHelper.php still exists and will write an entry to TYPO3s deprecation log if used. Please adapt your custom ViewHelpers and inherit from AbstractTagBasedViewHelper instead of TagBasedViewHelper. This resolves #8834
+[~TASK] Fluid: Marked vfs unit tests to be skipped, as vfs is not part of v4 (yet)
+[-TASK] Fluid: Removed @package/@subpackage annotations from all Fluid classes. They have already been removed in FLOW3 packages in r2813.
+[-TASK] Fluid: Removed @version annotation from all Fluid classes to ease the backporting process. Relates to #8835 (backported from Fluid package)
+[+BUGFIX] Fluid (View): fixed method signature of AbstractTemplateView:getTemplateSource() that was different from the concrete implementation (backported from Fluid package)
+Fluid in v5 and v4 are now synchronized again!
+[+FEATURE] Fluid: The TemplateVariableContainer now provides a method to retrieve all variables.
+[~TASK] Fluid (Core): Introduced a RenderingContextInterface to more cleanly decouple Fluid's rendering context from the TypoScript rendering context. Note that view helpers (and other code) should now refer to that interface instead of the concrete Fluid implementation!
+[!!!][+BUGFIX] Fluid (Core): Refactored all Condition-ViewHelpers like f:if, f:security.if* to use a newly created base class F3\Fluid\Core\ViewHelper\ConditionViewHelper. This greatly simplifies the implementation of custom conditions. However, THIS IS A BREAKING CHANGE in case you copied the f:if ViewHelper to create a custom condition ViewHelper, as the internal workings changed. Please check the new f:if ViewHelper to see how to adjust your ViewHelper -- you basically just have to throw away a lot of code. Resolves #8824.
+[!!!][-API] Fluid (TemplateView): Removed renderSection() and renderWithLayout() from public API in Tx_Fluid_View_TemplateView, as this should only be called from inside Fluid.
+[!!!][TASK] Fluid (ViewHelpers): the <f:section />-ViewHelper now does NOT render itself anymore when encountered in a normal template. Example: Before the change, the template "before <f:section name='...'> middle </f:section> after" was rendered as "before middle after", but now it is only rendered as "before after". Although this is a breaking change, it is quite unlikely that anybody relied on this behavior, as it was inconsistent beforehand.
+[TASK] Fluid (TemplateView): Major refactoring of the layout, partial and section rendering mechanism. This also induces a speedup as retundant rendering is eliminated.
+[+FEATURE] Fluid (ViewHelpers): The <f:render>-ViewHelper can be now used to render sections in the same partial and template. In these cases, all arguments need to be specified explicitely. Additionally, it can now be used to render a section recursively.
+[~TASK] Fluid (Core): Removed some non-API-methods which were never called.
+[+FEATURE] Fluid (ViewHelpers): format.crop ViewHelper now supports all features in Backend mode. Relates to #8648
+[+TASK] Fluid: Set dependency to Extbase 1.2.x in ext_emconf.php to avoid confusions when working with different versions
+[+TASK] Fluid: Backported recent changes from Fluid package:
+[+FEATURE] Fluid (ViewHelpers): added "selectAllByDefault" argument to form.select ViewHelper. Resolves #4984
+~TASK] Fluid (Parser): Got rid of the constructor in Parser\Configuration.
+[+FEATURE] Fluid (ViewHelpers): Added uri.image ViewHelper. This resolves #8233
+[+FEATURE] Fluid (ViewHelpers): Added URI options noCache, noCacheHash, section, format, additionalParams, absolute, addQueryString & argumentsToBeExcludedFromQueryString to FormViewHelper. Resolves #8247 [+BUGFIX] Fluid: Removed a leading backslash in ViewHelperBaseTestcase that led to an error with PHP < 5.3
+[+TASK] Fluid: Backported some recent Fluid changes (Note: this is not a complete backport, there are still changes in Fluid Package that are not backported yet):
+[+BUGFIX] Fluid (ViewHelpers): form.select ViewHelper did only check whether "multiple" attribute was set and not whether it was empty or not. Resolves #5879
+[+FEATURE] Fluid (ViewHelpers): GroupedForViewHelper can now group by object. Resolves #7389
+
+
+HOW TO CREATE THE CHANGELOG
+===========================
+git log [startRevision]..HEAD --pretty=format:"%s%n%b%n" | grep -v "^$" | grep -v "git-svn-id"
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php b/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
index 539b50f88af0fc585115336ac554cc9daad29cb4..edfd42c97d6ff08537f5fd9a79f39818d120e34b 100644
--- a/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
+++ b/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package
- * @subpackage
- * @version $Id: DocbookGeneratorService.php 1734 2009-11-25 21:53:57Z stucki $
  */
 /**
  * Class extending the docbook generator service for use in typo3 v4.
diff --git a/typo3/sysext/fluid/Classes/Compatibility/ObjectManager.php b/typo3/sysext/fluid/Classes/Compatibility/ObjectManager.php
index a6febc1e884e25e4264a2d4edf5301ca9eb4c4f9..2a3f0838dbff71561fa9053c6480253370515296 100644
--- a/typo3/sysext/fluid/Classes/Compatibility/ObjectManager.php
+++ b/typo3/sysext/fluid/Classes/Compatibility/ObjectManager.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package
- * @subpackage
- * @version $Id: ObjectFactory.php 1734 2009-11-25 21:53:57Z stucki $
  */
 /**
  * Class emulating the object factory for Fluid v4.
@@ -33,17 +30,20 @@ class Tx_Fluid_Compatibility_ObjectManager implements t3lib_Singleton {
 		'Tx_Fluid_Core_ViewHelper_AbstractViewHelper' => array(
 			'injectReflectionService' => 'Tx_Extbase_Reflection_Service'
 		),
-		'Tx_Fluid_Core_ViewHelper_TagBasedViewHelper' => array(
+		'Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper' => array(
 			'injectTagBuilder' => 'Tx_Fluid_Core_ViewHelper_TagBuilder'
 		),
 		'Tx_Fluid_Core_Parser_ParsingState' => array(
 			'injectVariableContainer' => 'Tx_Fluid_Core_ViewHelper_TemplateVariableContainer'
 		),
+
 		'Tx_Fluid_Core_Parser_TemplateParser' => array(
 			'injectObjectManager' => 'Tx_Fluid_Compatibility_ObjectManager'
 		),
-		'Tx_Fluid_Core_Rendering_RenderingContext' => array(
-			'injectObjectManager' => 'Tx_Fluid_Compatibility_ObjectManager'
+		'Tx_Fluid_Core_Rendering_RenderingContextInterface' => array(
+			'injectObjectManager' => 'Tx_Fluid_Compatibility_ObjectManager',
+			'injectTemplateVariableContainer' => 'Tx_Fluid_Core_ViewHelper_TemplateVariableContainer',
+			'injectViewHelperVariableContainer' => 'Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer'
 		),
 		'Tx_Fluid_Core_Parser_Interceptor_Escape' => array(
 			'injectObjectManager' => 'Tx_Fluid_Compatibility_ObjectManager'
diff --git a/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php b/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php
index 561c9acc2d066dd1210ca8f7b0d8aa69cf871cd2..2b676c9d1c3053882f54473f2b1fe9898935fe7c 100644
--- a/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php
+++ b/typo3/sysext/fluid/Classes/Compatibility/TemplateParserBuilder.php
@@ -15,9 +15,6 @@
  *                                                                        */
 
 /**
- * @package
- * @subpackage
- * @version $Id: TemplateParserBuilder.php 2043 2010-03-16 08:49:45Z sebastian $
  */
 /**
  * Build a template parser.
diff --git a/typo3/sysext/fluid/Classes/Core/Exception.php b/typo3/sysext/fluid/Classes/Core/Exception.php
index 9a919a66b420f215d9e3a604032f83d1b675e012..8b5cea048d7929890fbc8cc5d9da6342cd094fe0 100644
--- a/typo3/sysext/fluid/Classes/Core/Exception.php
+++ b/typo3/sysext/fluid/Classes/Core/Exception.php
@@ -23,9 +23,6 @@
 /**
  * A generic Fluid Core exception.
  *
- * @version $Id: Exception.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php b/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php
index 8ed1cee48e1dce1c917c502c09722f52b8bfc90a..4541b1a187b1c848d87be0c00ba8fb556b665cce 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/Configuration.php
@@ -24,28 +24,16 @@
  * The parser configuration. Contains all configuration needed to configure
  * the building of a SyntaxTree.
  *
- * @version $Id: Configuration.php 4269 2010-05-05 10:03:16Z robert $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
 class Tx_Fluid_Core_Parser_Configuration {
 
 	/**
-	 * generic interceptors registered with the configuration.
-	 * @var array<\SplObjectStorage>
+	 * Generic interceptors registered with the configuration.
+	 * @var array<Tx_Extbase_Persistence_ObjectStorage>
 	 */
-	protected $interceptors;
-
-	/**
-	 * Set up the internals...
-	 *
-	 * @author Karsten Dambekalns <karsten@typo3.org>
-	 */
-	public function __construct() {
-		$this->interceptors = array();
-	}
+	protected $interceptors = array();
 
 	/**
 	 * Adds an interceptor to apply to values coming from object accessors.
@@ -57,7 +45,7 @@ class Tx_Fluid_Core_Parser_Configuration {
 	public function addInterceptor(Tx_Fluid_Core_Parser_InterceptorInterface $interceptor) {
 		foreach ($interceptor->getInterceptionPoints() as $interceptionPoint) {
 			if (!isset($this->interceptors[$interceptionPoint])) {
-				$this->interceptors[$interceptionPoint] = new SplObjectStorage();
+				$this->interceptors[$interceptionPoint] = t3lib_div::makeInstance('Tx_Extbase_Persistence_ObjectStorage');
 			}
 			if (!$this->interceptors[$interceptionPoint]->contains($interceptor)) {
 				$this->interceptors[$interceptionPoint]->attach($interceptor);
@@ -65,34 +53,18 @@ class Tx_Fluid_Core_Parser_Configuration {
 		}
 	}
 
-	/**
-	 * Removes an interceptor to apply to values coming from object accessors.
-	 *
-	 * @param Tx_Fluid_Core_Parser_InterceptorInterface $interceptor
-	 * @return void
-	 * @author Karsten Dambekalns <karsten@typo3.org>
-	 */
-	public function removeInterceptor($interceptor) {
-		foreach ($interceptor->getInterceptionPoints() as $interceptionPoint) {
-			if ($this->interceptors[$interceptionPoint]->contains($interceptor)) {
-				$this->interceptors[$interceptionPoint]->detach($interceptor);
-			}
-		}
-
-	}
-
 	/**
 	 * Returns all interceptors for a given Interception Point.
 	 *
-	 * @param int $interceptionPoint one of the Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_* constants,
-	 * @return \SplObjectStorage<Tx_Fluid_Core_Parser_InterceptorInterface>
+	 * @param integer $interceptionPoint one of the Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_* constants,
+	 * @return Tx_Extbase_Persistence_ObjectStorage<Tx_Fluid_Core_Parser_InterceptorInterface>
 	 * @author Karsten Dambekalns <karsten@typo3.org>
 	 */
 	public function getInterceptors($interceptionPoint) {
-		if (isset($this->interceptors[$interceptionPoint]) && $this->interceptors[$interceptionPoint] instanceof SplObjectStorage) {
+		if (isset($this->interceptors[$interceptionPoint]) && $this->interceptors[$interceptionPoint] instanceof Tx_Extbase_Persistence_ObjectStorage) {
 			return $this->interceptors[$interceptionPoint];
 		}
-		return new SplObjectStorage();
+		return t3lib_div::makeInstance('Tx_Extbase_Persistence_ObjectStorage');
 	}
 
 }
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Exception.php b/typo3/sysext/fluid/Classes/Core/Parser/Exception.php
index ef33a3de1717a71f68303525dc4ff5f749fdc6e5..d8b2b3ab09001a86a76a19e5cea06fbd1692d708 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/Exception.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/Exception.php
@@ -23,9 +23,6 @@
 /**
  * A Parsing Exception
  *
- * @version $Id: Exception.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php b/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php
index 439cd76d660020eb94bb332ed2da587e0a72ab39..449defd5606d28f08d862175a82c69efbbb8a936 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/Interceptor/Escape.php
@@ -23,9 +23,6 @@
 /**
  * An interceptor adding the escape viewhelper to the suitable places.
  *
- * @version $Id: Escape.php 4040 2010-04-08 16:02:57Z k-fish $
- * @package Fluid
- * @subpackage Core\Parser\Interceptor
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_Interceptor_Escape implements Tx_Fluid_Core_Parser_InterceptorInterface {
@@ -67,7 +64,7 @@ class Tx_Fluid_Core_Parser_Interceptor_Escape implements Tx_Fluid_Core_Parser_In
 	 */
 	public function process(Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface $node, $interceptorPosition) {
 		if ($interceptorPosition === Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER) {
-			if (!$node->getViewHelper()->isEscapingInterceptorEnabled()) {
+			if (!$node->getUninitializedViewHelper()->isEscapingInterceptorEnabled()) {
 				$this->interceptorEnabled = FALSE;
 				$this->viewHelperNodesWhichDisableTheInterceptor[] = $node;
 			}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php
index cd0d050754b42319f0b1f1ea12c95bf3ea635e9f..92745b4dbdc1e4c0f58941801cb6b620671b575f 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/InterceptorInterface.php
@@ -24,9 +24,6 @@
  * An interceptor interface. Interceptors are used in the parsing stage to change
  * the syntax tree of a template, e.g. by adding viewhelper nodes.
  *
- * @version $Id: InterceptorInterface.php 4004 2010-03-23 14:11:29Z k-fish $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_Parser_InterceptorInterface {
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php
index 94e490f4763d9b6f400b60709be5938e7e8da913..b9eb61cba74c9f052df9cf64d23e932dc7157a2f 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/ParsedTemplateInterface.php
@@ -24,9 +24,6 @@
  * This interface is returned by Tx_Fluid_Core_Parser_TemplateParser->parse()
  * method and is a parsed template
  *
- * @version $Id: ParsedTemplateInterface.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_Parser_ParsedTemplateInterface {
@@ -34,10 +31,10 @@ interface Tx_Fluid_Core_Parser_ParsedTemplateInterface {
 	/**
 	 * Render the parsed template with rendering context
 	 *
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext The rendering context to use
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext The rendering context to use
 	 * @return Rendered string
 	 */
-	public function render(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext);
+	public function render(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
 
 	/**
 	 * Returns a variable container used in the PostParse Facet.
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php b/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php
index 33cd90c67d7fc761b501cf7de66b1af3949d6d75..3759c995276258f3d58d520d522f8883e119354c 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/ParsingState.php
@@ -25,9 +25,6 @@
  * and the current stack of open nodes (nodeStack) and a variable container used
  * for PostParseFacets.
  *
- * @version $Id: ParsingState.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -88,12 +85,11 @@ class Tx_Fluid_Core_Parser_ParsingState implements Tx_Fluid_Core_Parser_ParsedTe
 	/**
 	 * Render the parsed template with rendering context
 	 *
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext The rendering context to use
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext The rendering context to use
 	 * @return Rendered string
 	 */
-	public function render(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext) {
-		$this->rootNode->setRenderingContext($renderingContext);
-		return $this->rootNode->evaluate();
+	public function render(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		return $this->rootNode->evaluate($renderingContext);
 	}
 
 	/**
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php
index 6b2b63f759d041ac591354644e3b2a2943c6b215..14362b014b091eb34053a200d0f51030998d21e1 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php
@@ -23,9 +23,6 @@
 /**
  * Abstract node in the syntax tree which has been built.
  *
- * @version $Id: AbstractNode.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -37,41 +34,25 @@ abstract class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode implements Tx_Fluid_
 	 */
 	protected $childNodes = array();
 
-	/**
-	 * The rendering context containing everything to correctly render the subtree
-	 * @var Tx_Fluid_Core_Rendering_RenderingContext
-	 */
-	protected $renderingContext;
-
-	/**
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext Rendering Context to be used for this evaluation
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext) {
-		$this->renderingContext = $renderingContext;
-	}
-
 	/**
 	 * Evaluate all child nodes and return the evaluated results.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return mixed Normally, an object is returned - in case it is concatenated with a string, a string is returned.
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	public function evaluateChildNodes() {
+	public function evaluateChildNodes(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 		$output = NULL;
 		foreach ($this->childNodes as $subNode) {
-			$subNode->setRenderingContext($this->renderingContext);
-
 			if ($output === NULL) {
-				$output = $subNode->evaluate();
+				$output = $subNode->evaluate($renderingContext);
 			} else {
 				if (is_object($output) && !method_exists($output, '__toString')) {
 					throw new Tx_Fluid_Core_Parser_Exception('Cannot cast object of type "' . get_class($output) . '" to string.', 1248356140);
 				}
 				$output = (string)$output;
-				$subNodeOutput = $subNode->evaluate();
+				$subNodeOutput = $subNode->evaluate($renderingContext);
 
 				if (is_object($subNodeOutput) && !method_exists($subNodeOutput, '__toString')) {
 					throw new Tx_Fluid_Core_Parser_Exception('Cannot cast object of type "' . get_class($subNodeOutput) . '" to string.', 1273753083);
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php
index 91a32fcd55a09e44c9685a58019d73d0bd4c3772..aac967350363663d20e55542cd63dd1a2fce1f9d 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ArrayNode.php
@@ -23,9 +23,6 @@
 /**
  * Array Syntax Tree Node. Handles JSON-like arrays.
  *
- * @version $Id: ArrayNode.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -50,19 +47,16 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ArrayNode extends Tx_Fluid_Core_Parser_Syn
 	/**
 	 * Evaluate the array and return an evaluated array
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return array An associative array with literal values
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	public function evaluate() {
-		if ($this->renderingContext === NULL) {
-			throw new Tx_Fluid_Core_Parser_Exception('Rendering Context is null in ArrayNode, but necessary. If this error appears, please report a bug!', 1242668976);
-		}
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 		$arrayToBuild = array();
 		foreach ($this->internalArray as $key => $value) {
 			if ($value instanceof Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode) {
-				$value->setRenderingContext($this->renderingContext);
-				$arrayToBuild[$key] = $value->evaluate();
+				$arrayToBuild[$key] = $value->evaluate($renderingContext);
 			} else {
 				// TODO - this case should not happen!
 				$arrayToBuild[$key] = $value;
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php
index 7eae7190835d44d234e12d3873fcc94adb90da56..c518bf34547c9ef6c3ad5be2bcf4fdc068936659 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/NodeInterface.php
@@ -23,26 +23,18 @@
 /**
  * Node in the syntax tree.
  *
- * @version $Id: NodeInterface.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
 interface Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface {
 
-	/**
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext Rendering Context to be used for this evaluation
-	 * @return void
-	 */
-	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext);
-
 	/**
 	 * Evaluate all child nodes and return the evaluated results.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return mixed Normally, an object is returned - in case it is concatenated with a string, a string is returned.
 	 */
-	public function evaluateChildNodes();
+	public function evaluateChildNodes(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
 
 	/**
 	 * Returns all child nodes for a given node.
@@ -62,9 +54,10 @@ interface Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface {
 	/**
 	 * Evaluates the node - can return not only strings, but arbitary objects.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return mixed Evaluated node
 	 */
-	public function evaluate();
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
index 4f3039be68118b6ca4ad79bf5b87363119f5eedb..1671415a29029d295d76c227164a013f5f7cf3e0 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
@@ -23,9 +23,6 @@
 /**
  * A node which handles object access. This means it handles structures like {object.accessor.bla}
  *
- * @version $Id: ObjectAccessorNode.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -61,23 +58,45 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode extends Tx_Fluid_Core_P
 	 * The first part of the object path has to be a variable in the
 	 * TemplateVariableContainer.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return object The evaluated object, can be any object type.
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
-	 * @todo Depending on the context, either fail or not!!!
 	 */
-	public function evaluate() {
-		$objectPathParts = explode('.', $this->objectPath);
-		$variableName = array_shift($objectPathParts);
-		if (!$this->renderingContext->getTemplateVariableContainer()->exists($variableName)) {
-			return NULL;
-		}
-		$currentObject = $this->renderingContext->getTemplateVariableContainer()->get($variableName);
-		if (count($objectPathParts) > 0) {
-			return Tx_Extbase_Reflection_ObjectAccess::getPropertyPath($currentObject, implode('.', $objectPathParts));
-		} else {
-			return $currentObject;
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		return $this->getPropertyPath($renderingContext->getTemplateVariableContainer(), $this->objectPath, $renderingContext);
+	}
+
+	/**
+	 * Gets a property path from a given object or array.
+	 *
+	 * If propertyPath is "bla.blubb", then we first call getProperty($object, 'bla'),
+	 * and on the resulting object we call getProperty(..., 'blubb').
+	 *
+	 * For arrays the keys are checked likewise.
+	 *
+	 * @param mixed $subject An object or array
+	 * @param string $propertyPath
+	 * @return mixed Value of the property
+	 */
+	protected function getPropertyPath($subject, $propertyPath, Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		$propertyPathSegments = explode('.', $propertyPath);
+		foreach ($propertyPathSegments as $pathSegment) {
+			if (is_object($subject) && Tx_Extbase_Reflection_ObjectAccess::isPropertyGettable($subject, $pathSegment)) {
+				$subject = Tx_Extbase_Reflection_ObjectAccess::getProperty($subject, $pathSegment);
+			} elseif ((is_array($subject) || $subject instanceof ArrayAccess) && isset($subject[$pathSegment])) {
+				$subject = $subject[$pathSegment];
+			} else {
+				return NULL;
+			}
+
+			if ($subject instanceof Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface) {
+				$subject->setRenderingContext($renderingContext);
+			}
 		}
+		return $subject;
 	}
+
+
 }
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php
index 2e0e22a539d6551b1465c27f320bc727414e727c..49178474ac994724c14d9ebf7a9c29a8fd0e2297 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php
@@ -25,9 +25,6 @@
  * marked with this interface will get the current rendering context injected
  * by the ObjectAccessorNode on trying to evaluate them.
  *
- * @version $Id$
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface {
@@ -35,10 +32,10 @@ interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface {
 	/**
 	 * Sets the current rendering context
 	 *
-	 * @param $renderingContext
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return void
 	 */
-	public function setRenderingContext($renderingContext);
+	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext);
 
 }
 
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php
index f98ea7387b4a367fb3ed02a8071529361777a82a..9cdd5e33d901560f757dd4dc2221155db5f42179 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RootNode.php
@@ -23,9 +23,6 @@
 /**
  * Root node of every syntax tree.
  *
- * @version $Id: RootNode.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -34,15 +31,12 @@ class Tx_Fluid_Core_Parser_SyntaxTree_RootNode extends Tx_Fluid_Core_Parser_Synt
 	/**
 	 * Evaluate the root node, by evaluating the subtree.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return mixed Evaluated subtree
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function evaluate() {
-		if ($this->renderingContext === NULL) {
-			throw new Tx_Fluid_Core_Parser_Exception('Rendering Context is NULL in RootNode, but necessary. If this error appears, please report a bug!', 1242669004);
-		}
-		$result = $this->evaluateChildNodes();
-		return $result;
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		return $this->evaluateChildNodes($renderingContext);
 	}
 }
 
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php
index e0fc9ef787d39620f5577f49edc687724fb18c82..9a05d3f3b30f0da83fa66e6521124107587b20b3 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php
@@ -23,9 +23,6 @@
 /**
  * Text Syntax Tree Node - is a container for strings.
  *
- * @version $Id: TextNode.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -54,11 +51,23 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNode extends Tx_Fluid_Core_Parser_Synt
 	 * Return the text associated to the syntax tree. Text from child nodes is
 	 * appended to the text in the node's own text.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return string the text stored in this node/subtree.
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @todo TextNode shouldn't have child nodes
 	 */
-	public function evaluate() {
-		return $this->text . $this->evaluateChildNodes();
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		return $this->text . $this->evaluateChildNodes($renderingContext);
+	}
+
+	/**
+	 * Getter for text
+	 *
+	 * @return string The text of this node
+	 * @author Robert Lemke <robert@typo3.org>
+	 */
+	public function getText() {
+		return $this->text;
 	}
 }
 
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
index f49a5db6fe84fb257687192112e4441d863fd4ca..baf654dae361267b16bf3bf02aa20915f7ac2e87 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ViewHelperNode.php
@@ -23,9 +23,6 @@
 /**
  * Node which will call a ViewHelper associated with this node.
  *
- * @version $Id: ViewHelperNode.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser\SyntaxTree
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -47,7 +44,14 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 	 * The ViewHelper associated with this node
 	 * @var Tx_Fluid_Core_ViewHelper_ViewHelperInterface
 	 */
-	protected $viewHelper = NULL;
+	protected $uninitializedViewHelper = NULL;
+
+	/**
+	 * A mapping RenderingContext -> ViewHelper to only re-initialize ViewHelpers
+	 * when a context change occurs.
+	 * @var Tx_Extbase_Persistence_ObjectStorage
+	 */
+	protected $viewHelpersByContext = NULL;
 
 	/**
 	 * List of comparators which are supported in the boolean expression language.
@@ -83,24 +87,25 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 	 * @author Karsten Dambekalns <karsten@typo3.org>
 	 */
 	public function __construct(Tx_Fluid_Core_ViewHelper_ViewHelperInterface $viewHelper, array $arguments) {
-		$this->viewHelper = $viewHelper;
+		$this->uninitializedViewHelper = $viewHelper;
+		$this->viewHelpersByContext = t3lib_div::makeInstance('Tx_Extbase_Persistence_ObjectStorage');
 		$this->arguments = $arguments;
 
 		if (FALSE /*FIXME*/) {
-			$this->viewHelperClassName = $this->viewHelper->FLOW3_AOP_Proxy_getProxyTargetClassName();
+			$this->viewHelperClassName = $this->uninitializedViewHelper->FLOW3_AOP_Proxy_getProxyTargetClassName();
 		} else {
-			$this->viewHelperClassName = get_class($this->viewHelper);
+			$this->viewHelperClassName = get_class($this->uninitializedViewHelper);
 		}
 	}
 
 	/**
-	 * Returns the attached ViewHelper for this ViewHelperNode.
+	 * Returns the attached (but still uninitialized) ViewHelper for this ViewHelperNode.
 	 * We need this method because sometimes Interceptors need to ask some information from the ViewHelper.
 	 *
 	 * @return Tx_Fluid_Core_ViewHelper_AbstractViewHelper the attached ViewHelper, if it is initialized
 	 */
-	public function getViewHelper() {
-		return $this->viewHelper;
+	public function getUninitializedViewHelper() {
+		return $this->uninitializedViewHelper;
 	}
 
 	/**
@@ -123,32 +128,30 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 	 *
 	 * Afterwards, checks that the view helper did not leave a variable lying around.
 	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return object evaluated node after the view helper has been called.
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Karsten Dambekalns <karsten@typo3.org>
 	 * @todo check recreation of viewhelper when revisiting caching
 	 */
-	public function evaluate() {
-		if ($this->renderingContext === NULL) {
-			throw new Tx_Fluid_Core_Parser_Exception('RenderingContext is null in ViewHelperNode, but necessary. If this error appears, please report a bug!', 1242669031);
-		}
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		$objectManager = $renderingContext->getObjectManager();
+		$contextVariables = $renderingContext->getTemplateVariableContainer()->getAllIdentifiers();
 
-		$objectManager = $this->renderingContext->getObjectManager();
-		$contextVariables = $this->renderingContext->getTemplateVariableContainer()->getAllIdentifiers();
-
-		if ($this->viewHelper === NULL) {
-				// we have been resurrected from the cache
-			$this->viewHelper = $objectManager->create($this->viewHelperClassName);
+		if ($this->viewHelpersByContext->contains($renderingContext)) {
+			$viewHelper = $this->viewHelpersByContext[$renderingContext];
+		} else {
+			$viewHelper = clone $this->uninitializedViewHelper;
+			$this->viewHelpersByContext->attach($renderingContext, $viewHelper);
 		}
 
 		$evaluatedArguments = array();
 		$renderMethodParameters = array();
- 		if (count($this->viewHelper->prepareArguments())) {
- 			foreach ($this->viewHelper->prepareArguments() as $argumentName => $argumentDefinition) {
+ 		if (count($viewHelper->prepareArguments())) {
+ 			foreach ($viewHelper->prepareArguments() as $argumentName => $argumentDefinition) {
 				if (isset($this->arguments[$argumentName])) {
 					$argumentValue = $this->arguments[$argumentName];
-					$argumentValue->setRenderingContext($this->renderingContext);
-					$evaluatedArguments[$argumentName] = $this->convertArgumentValue($argumentValue, $argumentDefinition->getType());
+					$evaluatedArguments[$argumentName] = $this->convertArgumentValue($argumentValue, $argumentDefinition->getType(), $renderingContext);
 				} else {
 					$evaluatedArguments[$argumentName] = $argumentDefinition->getDefaultValue();
 				}
@@ -159,34 +162,28 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 		}
 
 		$viewHelperArguments = $objectManager->create('Tx_Fluid_Core_ViewHelper_Arguments', $evaluatedArguments);
-		$this->viewHelper->setArguments($viewHelperArguments);
-		$this->viewHelper->setTemplateVariableContainer($this->renderingContext->getTemplateVariableContainer());
-		if ($this->renderingContext->getControllerContext() !== NULL) {
-			$this->viewHelper->setControllerContext($this->renderingContext->getControllerContext());
+		$viewHelper->setArguments($viewHelperArguments);
+		$viewHelper->setTemplateVariableContainer($renderingContext->getTemplateVariableContainer());
+		if ($renderingContext->getControllerContext() !== NULL) {
+			$viewHelper->setControllerContext($renderingContext->getControllerContext());
 		}
-		$this->viewHelper->setViewHelperVariableContainer($this->renderingContext->getViewHelperVariableContainer());
-		$this->viewHelper->setViewHelperNode($this);
+		$viewHelper->setViewHelperVariableContainer($renderingContext->getViewHelperVariableContainer());
+		$viewHelper->setViewHelperNode($this);
+		$viewHelper->setRenderingContext($renderingContext);
 
-		if ($this->viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface) {
-			$this->viewHelper->setChildNodes($this->childNodes);
-			$this->viewHelper->setRenderingContext($this->renderingContext);
+		if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface) {
+			$viewHelper->setChildNodes($this->childNodes);
 		}
 
-		$this->viewHelper->validateArguments();
-		$this->viewHelper->initialize();
+		$viewHelper->validateArguments();
+		$viewHelper->initialize();
 		try {
-			$output = call_user_func_array(array($this->viewHelper, 'render'), $renderMethodParameters);
+			$output = call_user_func_array(array($viewHelper, 'render'), $renderMethodParameters);
 		} catch (Tx_Fluid_Core_ViewHelper_Exception $exception) {
 				// @todo [BW] rethrow exception, log, ignore.. depending on the current context
 			$output = $exception->getMessage();
 		}
 
-		if ($contextVariables != $this->renderingContext->getTemplateVariableContainer()->getAllIdentifiers()) {
-			$endContextVariables = $this->renderingContext->getTemplateVariableContainer();
-			$diff = array_intersect($endContextVariables, $contextVariables);
-
-			throw new RuntimeException('The following context variable has been changed after the view helper "' . $this->viewHelperClassName . '" has been called: ' .implode(', ', $diff), 1236081302);
-		}
 		return $output;
 	}
 
@@ -199,11 +196,11 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	protected function convertArgumentValue(Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, $type) {
+	protected function convertArgumentValue(Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, $type, Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 		if ($type === 'boolean') {
-			return $this->evaluateBooleanExpression($syntaxTreeNode);
+			return $this->evaluateBooleanExpression($syntaxTreeNode, $renderingContext);
 		}
-		return $syntaxTreeNode->evaluate();
+		return $syntaxTreeNode->evaluate($renderingContext);
 	}
 
 	/**
@@ -229,23 +226,22 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 	 * Then, we evaluate the obtained left and right side using the given comparator. This is done inside the evaluateComparator method.
 	 *
 	 * @param Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode Value to be converted
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
 	 * @return boolean Evaluated value
 	 * @throws Tx_Fluid_Core_Parser_Exception
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	protected function evaluateBooleanExpression(Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode) {
+	protected function evaluateBooleanExpression(Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode $syntaxTreeNode, Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 		$childNodes = $syntaxTreeNode->getChildNodes();
 		if (count($childNodes) > 3) {
-			throw new Tx_Fluid_Core_Parser_Exception('The expression "' . $syntaxTreeNode->evaluate() . '" has more than tree parts.', 1244201848);
+			throw new Tx_Fluid_Core_Parser_Exception('The expression "' . $syntaxTreeNode->evaluate($renderingContext) . '" has more than tree parts.', 1244201848);
 		}
 
 		$leftSide = NULL;
 		$rightSide = NULL;
 		$comparator = NULL;
 		foreach ($childNodes as $childNode) {
-			$childNode->setRenderingContext($this->renderingContext);
-
-			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode && !preg_match(str_replace('COMPARATORS', implode('|', self::$comparators), self::$booleanExpressionTextNodeCheckerRegularExpression), $childNode->evaluate())) {
+			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode && !preg_match(str_replace('COMPARATORS', implode('|', self::$comparators), self::$booleanExpressionTextNodeCheckerRegularExpression), $childNode->evaluate($renderingContext))) {
 				$comparator = NULL;
 					// skip loop and fall back to classical to boolean conversion.
 				break;
@@ -254,14 +250,14 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 			if ($comparator !== NULL) {
 					// comparator already set, we are evaluating the right side of the comparator
 				if ($rightSide === NULL) {
-					$rightSide = $childNode->evaluate();
+					$rightSide = $childNode->evaluate($renderingContext);
 				} else {
-					$rightSide .= $childNode->evaluate();
+					$rightSide .= $childNode->evaluate($renderingContext);
 				}
 			} elseif ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_TextNode
-				&& ($comparator = $this->getComparatorFromString($childNode->evaluate()))) {
+				&& ($comparator = $this->getComparatorFromString($childNode->evaluate($renderingContext)))) {
 					// comparator in current string segment
-				$explodedString = explode($comparator, $childNode->evaluate());
+				$explodedString = explode($comparator, $childNode->evaluate($renderingContext));
 				if (isset($explodedString[0]) && trim($explodedString[0]) !== '') {
 					$leftSide .= trim($explodedString[0]);
 				}
@@ -271,9 +267,9 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 			} else {
 					// comparator not found yet, on the left side of the comparator
 				if ($leftSide === NULL) {
-					$leftSide = $childNode->evaluate();
+					$leftSide = $childNode->evaluate($renderingContext);
 				} else {
-					$leftSide .= $childNode->evaluate();
+					$leftSide .= $childNode->evaluate($renderingContext);
 				}
 			}
 		}
@@ -281,8 +277,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 		if ($comparator !== NULL) {
 			return $this->evaluateComparator($comparator, $leftSide, $rightSide);
 		} else {
-			$syntaxTreeNode->setRenderingContext($this->renderingContext);
-			return $this->convertToBoolean($syntaxTreeNode->evaluate());
+			return $this->convertToBoolean($syntaxTreeNode->evaluate($renderingContext));
 		}
 	}
 
@@ -349,12 +344,12 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode extends Tx_Fluid_Core_Parse
 		if (is_bool($value)) {
 			return $value;
 		}
-		if (is_string($value)) {
-			return (!empty($value) && strtolower($value) !== 'false');
-		}
 		if (is_numeric($value)) {
 			return $value > 0;
 		}
+		if (is_string($value)) {
+			return (!empty($value) && strtolower($value) !== 'false');
+		}
 		if (is_array($value) || (is_object($value) && $value instanceof Countable)) {
 			return count($value) > 0;
 		}
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php b/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
index e6b1c1824f27b84dffe6841f55969447bf5f024f..8d65f6c7812e6df91bc7e8a66f974ac7947a8699 100644
--- a/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
+++ b/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
@@ -23,9 +23,6 @@
 /**
  * Template parser building up an object syntax tree
  *
- * @version $Id: TemplateParser.php 2046 2010-03-16 10:31:00Z sebastian $
- * @package Fluid
- * @subpackage Core\Parser
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_TemplateParser {
@@ -237,7 +234,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
 	);
 
 	/**
-	 * @var \Tx_Fluid_Compatibility_ObjectManager
+	 * @var Tx_Fluid_Compatibility_ObjectManager
 	 */
 	protected $objectManager;
 
@@ -269,7 +266,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
 
 	/**
 	 * Set the configuration for the parser.
-	 *h
+	 *
 	 * @param Tx_Fluid_Core_Parser_Configuration $configuration
 	 * @return void
 	 * @author Karsten Dambekalns <karsten@typo3.org>
@@ -581,7 +578,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
 
 			// Object Accessor
 		if (strlen($objectAccessorString) > 0) {
-
+			
 			$node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode', $objectAccessorString);
 			$this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_OBJECTACCESSOR);
 
@@ -809,7 +806,7 @@ class Tx_Fluid_Core_Parser_TemplateParser {
 	protected function textHandler(Tx_Fluid_Core_Parser_ParsingState $state, $text) {
 		$node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', $text);
 		$this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_TEXT);
-
+		
 		$state->getNodeFromStack()->addChildNode($node);
 	}
 
diff --git a/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
index 4ef84c2f967713136cd68c1b434f881c90447acd..8f96a954e487be3920b0e842a8a9e3e6a339bd21 100644
--- a/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
+++ b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
@@ -23,16 +23,14 @@
 /**
  *
  *
- * @version $Id: RenderingContext.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\Rendering
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
-class Tx_Fluid_Core_Rendering_RenderingContext {
+class Tx_Fluid_Core_Rendering_RenderingContext implements Tx_Fluid_Core_Rendering_RenderingContextInterface {
 
 	/**
 	 * Template Variable Container. Contains all variables available through object accessors in the template
+	 *
 	 * @var Tx_Fluid_Core_ViewHelper_TemplateVariableContainer
 	 */
 	protected $templateVariableContainer;
@@ -40,18 +38,21 @@ class Tx_Fluid_Core_Rendering_RenderingContext {
 	/**
 	 * Object manager which is bubbled through. The ViewHelperNode cannot get an ObjectManager injected because
 	 * the whole syntax tree should be cacheable
+	 *
 	 * @var Tx_Fluid_Compatibility_ObjectManager
 	 */
 	protected $objectManager;
 
 	/**
 	 * Controller context being passed to the ViewHelper
+	 *
 	 * @var Tx_Extbase_MVC_Controller_ControllerContext
 	 */
 	protected $controllerContext;
 
 	/**
 	 * ViewHelper Variable Container
+	 *
 	 * @var Tx_Fluid_Core_ViewHelpers_ViewHelperVariableContainer
 	 */
 	protected $viewHelperVariableContainer;
@@ -77,13 +78,13 @@ class Tx_Fluid_Core_Rendering_RenderingContext {
 	}
 
 	/**
-	 * Sets the template variable container containing all variables available through ObjectAccessors
+	 * Injects the template variable container containing all variables available through ObjectAccessors
 	 * in the template
 	 *
 	 * @param Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $templateVariableContainer The template variable container to set
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function setTemplateVariableContainer(Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $templateVariableContainer) {
+	public function injectTemplateVariableContainer(Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $templateVariableContainer) {
 		$this->templateVariableContainer = $templateVariableContainer;
 	}
 
@@ -124,7 +125,7 @@ class Tx_Fluid_Core_Rendering_RenderingContext {
 	 * @return void
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function setViewHelperVariableContainer(Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer) {
+	public function injectViewHelperVariableContainer(Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer) {
 		$this->viewHelperVariableContainer = $viewHelperVariableContainer;
 	}
 
diff --git a/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextInterface.php b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..e717c6a750efeef99230e431445e488484066929
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/Core/Rendering/RenderingContextInterface.php
@@ -0,0 +1,81 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ *
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+interface Tx_Fluid_Core_Rendering_RenderingContextInterface {
+
+	/**
+	 * Returns the object manager. Only the ViewHelperNode should do this.
+	 *
+	 * @param Tx_Fluid_Compatibility_ObjectManager $objectManager
+	 */
+	public function getObjectManager();
+
+	/**
+	 * Injects the template variable container containing all variables available through ObjectAccessors
+	 * in the template
+	 *
+	 * @param Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $templateVariableContainer The template variable container to set
+	 */
+	public function injectTemplateVariableContainer(Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $templateVariableContainer);
+
+	/**
+	 * Get the template variable container
+	 *
+	 * @return Tx_Fluid_Core_ViewHelper_TemplateVariableContainer The Template Variable Container
+	 */
+	public function getTemplateVariableContainer();
+
+	/**
+	 * Set the controller context which will be passed to the ViewHelper
+	 *
+	 * @param Tx_Extbase_MVC_Controller_ControllerContext $controllerContext The controller context to set
+	 */
+	public function setControllerContext(Tx_Extbase_MVC_Controller_ControllerContext $controllerContext);
+
+	/**
+	 * Get the controller context which will be passed to the ViewHelper
+	 *
+	 * @return Tx_Extbase_MVC_Controller_ControllerContext The controller context to set
+	 */
+	public function getControllerContext();
+
+	/**
+	 * Set the ViewHelperVariableContainer
+	 *
+	 * @param Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer
+	 * @return void
+	 */
+	public function injectViewHelperVariableContainer(Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer);
+
+	/**
+	 * Get the ViewHelperVariableContainer
+	 *
+	 * @return Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer
+	 */
+	public function getViewHelperVariableContainer();
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
new file mode 100644
index 0000000000000000000000000000000000000000..e5f1d0e1b8beef515fc9564c2fb3ae2faa144878
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
@@ -0,0 +1,122 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * This view helper is an abstract ViewHelper which implements an if/else condition.
+ * @see Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode::convertArgumentValue() to find see how boolean arguments are evaluated
+ *
+ * = Usage =
+ *
+ * To create a custom Condition ViewHelper, you need to subclass this class, and
+ * implement your own render() method. Inside there, you should call $this->renderThenChild()
+ * if the condition evaluated to TRUE, and $this->renderElseChild() if the condition evaluated
+ * to FALSE.
+ *
+ * Every Condition ViewHelper has a "then" and "else" argument, so it can be used like:
+ * <[aConditionViewHelperName] .... then="condition true" else="condition false" />,
+ * or as well use the "then" and "else" child nodes.
+ *
+ * @see Tx_Fluid_ViewHelpers_IfViewHelper for a more detailed explanation and a simple usage example.
+ * Make sure to NOT OVERRIDE the constructor.
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
+ * @scope prototype
+ */
+abstract class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
+
+	/**
+	 * An array of Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode
+	 * @var array
+	 */
+	private $childNodes = array();
+
+	/**
+	 * Setter for ChildNodes - as defined in ChildNodeAccessInterface
+	 *
+	 * @param array $childNodes Child nodes of this syntax tree node
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function setChildNodes(array $childNodes) {
+		$this->childNodes = $childNodes;
+	}
+
+	/**
+	 * Initializes the "then" and "else" arguments
+	 *
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function __construct() {
+		$this->registerArgument('then', 'mixed', 'Value to be returned if the condition if met.', FALSE);
+		$this->registerArgument('else', 'mixed', 'Value to be returned if the condition if not met.', FALSE);
+	}
+
+	/**
+	 * Returns value of "then" attribute.
+	 * If then attribute is not set, iterates through child nodes and renders ThenViewHelper.
+	 * If then attribute is not set and no ThenViewHelper is found, all child nodes are rendered
+	 *
+	 * @return string rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was found
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
+	 */
+	protected function renderThenChild() {
+		if ($this->arguments->hasArgument('then')) {
+			return $this->arguments['then'];
+		}
+		foreach ($this->childNodes as $childNode) {
+			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
+				&& $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
+				$data = $childNode->evaluate($this->getRenderingContext());
+				return $data;
+			}
+		}
+		return $this->renderChildren();
+	}
+
+	/**
+	 * Returns value of "else" attribute.
+	 * If else attribute is not set, iterates through child nodes and renders ElseViewHelper.
+	 * If else attribute is not set and no ElseViewHelper is found, an empty string will be returned.
+	 *
+	 * @return string rendered ElseViewHelper or an empty string if no ThenViewHelper was found
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
+	 */
+	protected function renderElseChild() {
+		foreach ($this->childNodes as $childNode) {
+			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
+				&& $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
+				return $childNode->evaluate($this->getRenderingContext());
+			}
+		}
+		if ($this->arguments->hasArgument('else')) {
+			return $this->arguments['else'];
+		}
+		return '';
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php
new file mode 100644
index 0000000000000000000000000000000000000000..e6bdb533ec98df8e791d2fc04349eaf98d16a8d5
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractTagBasedViewHelper.php
@@ -0,0 +1,138 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * Tag based view helper.
+ * Sould be used as the base class for all view helpers which output simple tags, as it provides some
+ * convenience methods to register default attributes, ...
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
+ * @scope prototype
+ */
+abstract class Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
+
+	/**
+	 * Names of all registered tag attributes
+	 * @var array
+	 */
+	protected $tagAttributes = array();
+
+	/**
+	 * Tag builder instance
+	 *
+	 * @var Tx_Fluid_Core_ViewHelper_TagBuilder
+	 * @api
+	 */
+	protected $tag = NULL;
+
+	/**
+	 * name of the tag to be created by this view helper
+	 *
+	 * @var string
+	 * @api
+	 */
+	protected $tagName = 'div';
+
+	/**
+	 * Inject a TagBuilder
+	 *
+	 * @param Tx_Fluid_Core_ViewHelper_TagBuilder $tagBuilder Tag builder
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function injectTagBuilder(Tx_Fluid_Core_ViewHelper_TagBuilder $tagBuilder) {
+		$this->tag = $tagBuilder;
+	}
+
+	/**
+	 * Constructor
+	 *
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @api
+	 */
+	public function __construct() {
+		$this->registerArgument('additionalAttributes', 'array', 'Additional tag attributes. They will be added directly to the resulting HTML tag.', FALSE);
+	}
+
+	/**
+	 * Sets the tag name to $this->tagName.
+	 * Additionally, sets all tag attributes which were registered in
+	 * $this->tagAttributes and additionalArguments.
+	 *
+	 * Will be invoked just before the render method.
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
+	 */
+	public function initialize() {
+		parent::initialize();
+		$this->tag->reset();
+		$this->tag->setTagName($this->tagName);
+		if (is_array($this->arguments['additionalAttributes'])) {
+			$this->tag->addAttributes($this->arguments['additionalAttributes']);
+		}
+		foreach ($this->tagAttributes as $attributeName) {
+			if ($this->arguments->hasArgument($attributeName) && $this->arguments[$attributeName] !== '') {
+				$this->tag->addAttribute($attributeName, $this->arguments[$attributeName]);
+			}
+		}
+	}
+
+	/**
+	 * Register a new tag attribute. Tag attributes are all arguments which will be directly appended to a tag if you call $this->initializeTag()
+	 *
+	 * @param string $name Name of tag attribute
+	 * @param strgin $type Type of the tag attribute
+	 * @param string $description Description of tag attribute
+	 * @param boolean $required set to TRUE if tag attribute is required. Defaults to FALSE.
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @api
+	 */
+	protected function registerTagAttribute($name, $type, $description, $required = FALSE) {
+		$this->registerArgument($name, $type, $description, $required, NULL);
+		$this->tagAttributes[] = $name;
+	}
+
+	/**
+	 * Registers all standard HTML universal attributes.
+	 * Should be used inside registerArguments();
+	 *
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @api
+	 */
+	protected function registerUniversalTagAttributes() {
+		$this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
+		$this->registerTagAttribute('dir', 'string', 'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
+		$this->registerTagAttribute('id', 'string', 'Unique (in this file) identifier for this HTML element.');
+		$this->registerTagAttribute('lang', 'string', 'Language for this element. Use short names specified in RFC 1766');
+		$this->registerTagAttribute('style', 'string', 'Individual CSS styles for this element');
+		$this->registerTagAttribute('title', 'string', 'Tooltip text of element');
+		$this->registerTagAttribute('accesskey', 'string', 'Keyboard shortcut to access this element');
+		$this->registerTagAttribute('tabindex', 'integer', 'Specifies the tab order of this element');
+		$this->registerTagAttribute('onclick', 'string', 'JavaScript evaluated for the onclick event');
+	}
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
index 789d471677eede3d0357ddcae4b6e720a0933885..cdac69dc8940e23db730ea9b7d56fa3d9ec68441 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
@@ -23,9 +23,6 @@
 /**
  * The abstract base class for all view helpers.
  *
- * @version $Id: AbstractViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -71,6 +68,11 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_C
 	 */
 	protected $controllerContext;
 
+	/**
+	 * @var Tx_Fluid_Core_Rendering_RenderingContextInterface
+	 */
+	private $renderingContext;
+
 	/**
 	 * ViewHelper Variable Container
 	 * @var Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer
@@ -119,6 +121,16 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_C
 		$this->controllerContext = $controllerContext;
 	}
 
+	/**
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
+	 * @return void
+	 * @author Robert Lemke <robert@typo3.org>
+	 */
+	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+	 $this->renderingContext = $renderingContext;
+	}
+
+
 	/**
 	 * @param Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer $viewHelperVariableContainer
 	 * @return void
@@ -171,6 +183,29 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_C
 		return $this;
 	}
 
+	/**
+	 * Overrides a registered argument. Call this method from your ViewHelper subclass
+	 * inside the initializeArguments() method if you want to override a previously registered argument.
+	 * @see registerArgument()
+	 *
+	 * @param string $name Name of the argument
+	 * @param string $type Type of the argument
+	 * @param string $description Description of the argument
+	 * @param boolean $required If TRUE, argument is required. Defaults to FALSE.
+	 * @param mixed $defaultValue Default value of argument
+	 * @return Tx_Fluid_Core_ViewHelper_AbstractViewHelper $this, to allow chaining.
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @todo Object Factory usage!
+	 * @api
+	 */
+	protected function overrideArgument($name, $type, $description, $required = FALSE, $defaultValue = NULL) {
+		if (!array_key_exists($name, $this->argumentDefinitions)) {
+			throw new Tx_Fluid_Core_ViewHelper_Exception('Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', 1279212461);
+		}
+		$this->argumentDefinitions[$name] = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($name, $type, $description, $required, $defaultValue);
+		return $this;
+	}
+
 	/**
 	 * Sets all needed attributes needed for the rendering. Called by the
 	 * framework. Populates $this->viewHelperNode.
@@ -206,7 +241,7 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_C
 	 * @api
 	 */
 	protected function renderChildren() {
-		return $this->viewHelperNode->evaluateChildNodes();
+		return $this->viewHelperNode->evaluateChildNodes($this->renderingContext);
 	}
 
 	/**
@@ -333,6 +368,21 @@ abstract class Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_C
 	 * @api
 	 */
 	//abstract public function render();
+
+	/**
+	 * Get the rendering context interface.
+	 * THIS METHOD IS NO PUBLIC API AND ONLY CALLABLE INSIDE THE FRAMEWORK!
+	 *
+	 * @return Tx_Fluid_Core_Rendering_RenderingContextInterface
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function getRenderingContext() {
+		if ($this instanceof Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface) {
+			return $this->renderingContext;
+		} else {
+			throw new Tx_Fluid_Core_ViewHelper_Exception_RenderingContextNotAccessibleException('It is forbidden to call getRenderingContext() if you do not implement Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface. But beware, this interface is NO PUBLIC API! If you want to implement conditions, you should subclass Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper.', 127895038);
+		}
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php
index abb5081f0cbf0984a24e555766cf9ccb21f7fa24..b5f49a2022b71073bef343b48df93b9ce051696b 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/ArgumentDefinition.php
@@ -23,9 +23,6 @@
 /**
  * Argument definition of each view helper argument
  *
- * @version $Id: ArgumentDefinition.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_ViewHelper_ArgumentDefinition {
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php
index 7c76c79a1d47e39eac87d80a7d47fbf942b5f2dc..3569c630feefd533b0a27cf50689d0cfbb3c923f 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php
@@ -25,9 +25,6 @@
  * Is available inside every view helper as $this->arguments - and you use it as if it was an array.
  * However, you can only read, and not write to it.
  *
- * @version $Id: Arguments.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php
index 88db48524c617e6539026831adf6f684eb0aeac6..3f738c76832074a2bf2af7f2908357a625aebe2d 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception.php
@@ -23,12 +23,9 @@
 /**
  * A ViewHelper Exception
  *
- * @version $Id: Exception.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
 class Tx_Fluid_Core_ViewHelper_Exception extends Tx_Fluid_Core_Exception {
 }
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php
index 0c88b2be010a307e1442de2f56ce5d23b2ff9d90..1a10c61ded607f543d4f2ce8d846f7f26d79e8f3 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/InvalidVariableException.php
@@ -23,9 +23,6 @@
 /**
  * A "Invalid Variable" exception.
  *
- * @version $Id$
- * @package Fluid
- * @subpackage Core\ViewHelper\Exception
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php
new file mode 100644
index 0000000000000000000000000000000000000000..ac2b67686a2e093e1102a6df7004473da1330d6b
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php
@@ -0,0 +1,32 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * A "Rendering Context not Accessible" exception.
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
+ */
+class Tx_Fluid_Core_ViewHelper_Exception_RenderingContextNotAccessibleException extends Tx_Fluid_Core_ViewHelper_Exception {
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php
index dc2fee567af655f6358fb299fa0291ed150d70e9..6af7d62120099b018a6f1d8173d57531029cdbec 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php
@@ -25,18 +25,16 @@
  * need access to the direct children in the Syntax Tree at rendering-time.
  * This might happen if you only want to selectively render a part of the syntax
  * tree depending on some conditions.
+ * To render subnodes, you can fetch the RenderingContext via $this->getRenderingContext().
  *
- * In most cases, you will not need this view helper.
+ * In most cases, you will not need this facet, and it is NO PUBLIC API!
+ * Right now it is only used internally for conditions, so by subclassing Tx_Fluid_Core_ViewHelpers_AbstractConditionViewHelper, this should be all you need.
  *
  * See Tx_Fluid_ViewHelpers_IfViewHelper for an example how it is used.
  *
- * @version $Id: ChildNodeAccessInterface.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper\Facets
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
-
 	/**
 	 * Sets the direct child nodes of the current syntax tree node.
 	 *
@@ -44,15 +42,6 @@ interface Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
 	 * @return void
 	 */
 	public function setChildNodes(array $childNodes);
-
-	/**
-	 * Sets the rendering context which needs to be passed on to child nodes
-	 *
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext the renderingcontext to use
-	 * @return void
-	 */
-	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext);
-
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php
index 18c10882832671b6ac3007c9621993b47b309565..cadc58c34a814623ec3f8562b92b8719a88a0b90 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Facets/PostParseInterface.php
@@ -32,9 +32,6 @@
  *
  * Normally, this facet is not needed, except in really really rare cases.
  *
- * @version $Id: PostParseInterface.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper\Facets
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_ViewHelper_Facets_PostParseInterface {
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php
index 91774ce3db198938e1a8f7013dfd52022c0be343..8c23284eff00289712db14833fda3546c52ee8b2 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php
@@ -21,121 +21,22 @@
  *                                                                        */
 
 /**
- * Tag based view helper.
- * Sould be used as the base class for all view helpers which output simple tags, as it provides some
- * convenience methods to register default attributes, ...
+ * @deprecated. Extend Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper instead!
  *
- * @version $Id: TagBasedViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
  */
-abstract class Tx_Fluid_Core_ViewHelper_TagBasedViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
-
-	/**
-	 * Names of all registered tag attributes
-	 * @var array
-	 */
-	protected $tagAttributes = array();
-
-	/**
-	 * Tag builder instance
-	 *
-	 * @var Tx_Fluid_Core_ViewHelper_TagBuilder
-	 * @api
-	 */
-	protected $tag = NULL;
-
-	/**
-	 * name of the tag to be created by this view helper
-	 *
-	 * @var string
-	 * @api
-	 */
-	protected $tagName = 'div';
-
-	/**
-	 * Inject a TagBuilder
-	 *
-	 * @param Tx_Fluid_Core_ViewHelper_TagBuilder $tagBuilder Tag builder
-	 * @return void
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function injectTagBuilder(Tx_Fluid_Core_ViewHelper_TagBuilder $tagBuilder) {
-		$this->tag = $tagBuilder;
-	}
+abstract class Tx_Fluid_Core_ViewHelper_TagBasedViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * Constructor
 	 *
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	public function __construct() {
-		$this->registerArgument('additionalAttributes', 'array', 'Additional tag attributes. They will be added directly to the resulting HTML tag.', FALSE);
-	}
-
-	/**
-	 * Sets the tag name to $this->tagName.
-	 * Additionally, sets all tag attributes which were registered in
-	 * $this->tagAttributes and additionalArguments.
-	 *
-	 * Will be invoked just before the render method.
-	 *
-	 * @return void
 	 * @author Bastian Waidelich <bastian@typo3.org>
-	 * @api
 	 */
-	public function initialize() {
-		parent::initialize();
-		$this->tag->reset();
-		$this->tag->setTagName($this->tagName);
-		if (is_array($this->arguments['additionalAttributes'])) {
-			$this->tag->addAttributes($this->arguments['additionalAttributes']);
-		}
-		foreach ($this->tagAttributes as $attributeName) {
-			if ($this->arguments->hasArgument($attributeName) && $this->arguments[$attributeName] !== '') {
-				$this->tag->addAttribute($attributeName, $this->arguments[$attributeName]);
-			}
-		}
-	}
-
-	/**
-	 * Register a new tag attribute. Tag attributes are all arguments which will be directly appended to a tag if you call $this->initializeTag()
-	 *
-	 * @param string $name Name of tag attribute
-	 * @param strgin $type Type of the tag attribute
-	 * @param string $description Description of tag attribute
-	 * @param boolean $required set to TRUE if tag attribute is required. Defaults to FALSE.
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	protected function registerTagAttribute($name, $type, $description, $required = FALSE) {
-		$this->registerArgument($name, $type, $description, $required, NULL);
-		$this->tagAttributes[] = $name;
-	}
-
-	/**
-	 * Registers all standard HTML universal attributes.
-	 * Should be used inside registerArguments();
-	 *
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	protected function registerUniversalTagAttributes() {
-		$this->registerTagAttribute('class', 'string', 'CSS class(es) for this element');
-		$this->registerTagAttribute('dir', 'string', 'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
-		$this->registerTagAttribute('id', 'string', 'Unique (in this file) identifier for this HTML element.');
-		$this->registerTagAttribute('lang', 'string', 'Language for this element. Use short names specified in RFC 1766');
-		$this->registerTagAttribute('style', 'string', 'Individual CSS styles for this element');
-		$this->registerTagAttribute('title', 'string', 'Tooltip text of element');
-		$this->registerTagAttribute('accesskey', 'string', 'Keyboard shortcut to access this element');
-		$this->registerTagAttribute('tabindex', 'integer', 'Specifies the tab order of this element');
-		$this->registerTagAttribute('onclick', 'string', 'JavaScript evaluated for the onclick event');
+	public function __construct() {
+		t3lib_div::deprecationLog('the ViewHelper "' . get_class($this) . '" extends "Tx_Fluid_Core_ViewHelper_TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper"');
+		parent::__construct();
 	}
 }
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php
index 363493dc399fad8813397b07fbabdad825e6cec9..f789e3295a5cbc8d1a00080c9c5317ed735f6b22 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php
@@ -21,11 +21,8 @@
  *                                                                        */
 
 /**
- * Tag builder. Can be easily accessed in TagBasedViewHelper
+ * Tag builder. Can be easily accessed in AbstractTagBasedViewHelper
  *
- * @version $Id: TagBuilder.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php
index 77a6d0ed40fc411ab917438a02805c246881b14c..117e903dc5a63ef2b8f13b13446cb11082980490 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php
@@ -27,9 +27,6 @@
  * 1) Holds the current variables in the template
  * 2) Holds variables being set during Parsing (set in view helpers implementing the PostParse facet)
  *
- * @version $Id: TemplateVariableContainer.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -111,6 +108,16 @@ class Tx_Fluid_Core_ViewHelper_TemplateVariableContainer implements ArrayAccess
 		return array_keys($this->variables);
 	}
 
+	/**
+	 * Returns the variables array.
+	 *
+	 * @return array Identifiers and values of all variables
+	 * @author Robert Lemke <robert@typo3.org>
+	 */
+	public function getAll() {
+		return $this->variables;
+	}
+
 	/**
 	 * Checks if this property exists in the VariableContainer.
 	 *
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php
index adc113ffb89a53af0d90766d8e3c0cec226678d9..ccf6ae3c017fb629fef4d13a6937c49d92a34c9c 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperInterface.php
@@ -21,9 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: ViewHelperInterface.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 interface Tx_Fluid_Core_ViewHelper_ViewHelperInterface {
diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php
index af0a1f052842133abb56cae8800ed5cded1920aa..39dac0c8f9f61251222b36d9332a022023e271a9 100644
--- a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php
+++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php
@@ -21,9 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: ViewHelperVariableContainer.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage Core\ViewHelper
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -39,7 +36,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
 
 	/**
 	 *
-	 * @var Tx_Extbase_MVC_View_ViewInterface
+	 * @var Tx_Fluid_View_AbstractTemplateView
 	 */
 	protected $view;
 
@@ -126,11 +123,11 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
 	/**
 	 * Set the view to pass it to ViewHelpers.
 	 *
-	 * @param Tx_Extbase_MVC_View_ViewInterface $view View to set
+	 * @param Tx_Fluid_View_AbstractTemplateView $view View to set
 	 * @return void
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function setView(Tx_Extbase_MVC_View_ViewInterface $view) {
+	public function setView(Tx_Fluid_View_AbstractTemplateView $view) {
 		$this->view = $view;
 	}
 
@@ -139,7 +136,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer {
 	 *
 	 * !!! This is NOT a public API and might still change!!!
 	 *
-	 * @return Tx_Extbase_MVC_View_ViewInterface The View
+	 * @return Tx_Fluid_View_AbstractTemplateView The View
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	public function getView() {
diff --git a/typo3/sysext/fluid/Classes/Exception.php b/typo3/sysext/fluid/Classes/Exception.php
index c10d6d2cdaca8766cf0db5f72aa0d69b349e72bd..bc54149b3a9cb14e4dfedecda5ad848512afe12c 100644
--- a/typo3/sysext/fluid/Classes/Exception.php
+++ b/typo3/sysext/fluid/Classes/Exception.php
@@ -13,9 +13,6 @@
  *                                                                        */
 
 /**
- * @package
- * @subpackage
- * @version $Id: Exception.php 1734 2009-11-25 21:53:57Z stucki $
  */
 class Tx_Fluid_Exception extends Exception {
 
diff --git a/typo3/sysext/fluid/Classes/Fluid.php b/typo3/sysext/fluid/Classes/Fluid.php
index 31bf0cce065b45da4f95f50f389bed2499a9fcee..acacc52643421fda381bb192f8a37dd6b2c22051 100644
--- a/typo3/sysext/fluid/Classes/Fluid.php
+++ b/typo3/sysext/fluid/Classes/Fluid.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package
- * @subpackage
- * @version $Id: Fluid.php 1734 2009-11-25 21:53:57Z stucki $
  */
 class Tx_Fluid_Fluid {
 	const NAMESPACE_SEPARATOR = '_';
diff --git a/typo3/sysext/fluid/Classes/Service/DocbookGenerator.php b/typo3/sysext/fluid/Classes/Service/DocbookGenerator.php
index 5c2d7db991ed397271cd4b582d532bd834eb966a..63c9667c3bfe1f2e437ac9092ee407f133874af6 100644
--- a/typo3/sysext/fluid/Classes/Service/DocbookGenerator.php
+++ b/typo3/sysext/fluid/Classes/Service/DocbookGenerator.php
@@ -24,9 +24,6 @@
  * XML Schema (XSD) Generator. Will generate an XML schema which can be used for autocompletion
  * in schema-aware editors like Eclipse XML editor.
  *
- * @version $Id: DocbookGenerator.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage Service
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Service_DocbookGenerator extends Tx_Fluid_Service_AbstractGenerator {
diff --git a/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php b/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
new file mode 100644
index 0000000000000000000000000000000000000000..5cf95e5176eba44c5bd09a702bbd05be28c160e3
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php
@@ -0,0 +1,399 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * Abstract Fluid Template View.
+ *
+ * Contains the fundamental methods which any Fluid based template view needs.
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+abstract class Tx_Fluid_View_AbstractTemplateView implements Tx_Fluid_View_TemplateViewInterface {
+
+	/**
+	 * Constants defining possible rendering types
+	 */
+	const RENDERING_TEMPLATE = 1;
+	const RENDERING_PARTIAL = 2;
+	const RENDERING_LAYOUT = 3;
+
+	/**
+	 * @var Tx_Extbase_MVC_Controller_ControllerContext
+	 */
+	protected $controllerContext;
+
+	/**
+	 * @var Tx_Fluid_Compatibility_ObjectManager
+	 */
+	protected $objectManager;
+
+	/**
+	 * @var Tx_Fluid_Core_Parser_TemplateParser
+	 */
+	protected $templateParser;
+
+	/**
+	 * The initial rendering context for this template view.
+	 * Due to the rendering stack, another rendering context might be active
+	 * at certain points while rendering the template.
+	 *
+	 * @var Tx_Fluid_Core_Rendering_RenderingContextInterface
+	 */
+	protected $baseRenderingContext;
+
+	/**
+	 * Stack containing the current rendering type, the current rendering context, and the current parsed template
+	 * Do not manipulate directly, instead use the methods"getCurrent*()", "startRendering(...)" and "stopRendering()"
+	 * @var array
+	 */
+	protected $renderingStack = array();
+
+	/**
+	 * Injects the Object Manager
+	 *
+	 * @param Tx_Fluid_Compatibility_ObjectManager $objectManager
+	 * @return void
+	 * @author Robert Lemke <robert@typo3.org>
+	 */
+	public function injectObjectManager(Tx_Fluid_Compatibility_ObjectManager $objectManager) {
+		$this->objectManager = $objectManager;
+	}
+
+	/**
+	 * Inject the Template Parser
+	 *
+	 * @param Tx_Fluid_Core_Parser_TemplateParser $templateParser The template parser
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function injectTemplateParser(Tx_Fluid_Core_Parser_TemplateParser $templateParser) {
+		$this->templateParser = $templateParser;
+	}
+
+	/**
+	 * Injects a fresh rendering context
+	 *
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
+	 * @return void
+	 * @author Robert Lemke <robert@typo3.org>
+	 */
+	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		$this->baseRenderingContext = $renderingContext;
+		$this->baseRenderingContext->getViewHelperVariableContainer()->setView($this);
+		$this->controllerContext = $renderingContext->getControllerContext();
+	}
+
+	/**
+	 * Sets the current controller context
+	 *
+	 * @param Tx_Extbase_MVC_Controller_ControllerContext $controllerContext
+	 * @return void
+	 * @author Robert Lemke <robert@typo3.org>
+	 * @api
+	 */
+	public function setControllerContext(Tx_Extbase_MVC_Controller_ControllerContext $controllerContext) {
+		$this->controllerContext = $controllerContext;
+	}
+
+	/**
+	 * Returns the template parser that is used to parse this views template
+	 *
+	 * @return Tx_Fluid_Core_Parser_TemplateParser
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
+	 */
+	public function getTemplateParser() {
+		return $this->templateParser;
+	}
+
+	public function initializeView() {
+	}
+	// Here, the backporter can insert the initializeView method, which is needed for Fluid v4.
+
+	/**
+	 * Assign a value to the variable container.
+	 *
+	 * @param string $key The key of a view variable to set
+	 * @param mixed $value The value of the view variable
+	 * @return Tx_Fluid_View_AbstractTemplateView the instance of this view to allow chaining
+	 * @author Robert Lemke <robert@typo3.org>
+	 * @api
+	 */
+	public function assign($key, $value) {
+		$templateVariableContainer = $this->baseRenderingContext->getTemplateVariableContainer();
+		if ($templateVariableContainer->exists($key)) {
+			$templateVariableContainer->remove($key);
+		}
+		$templateVariableContainer->add($key, $value);
+		return $this;
+	}
+
+	/**
+	 * Assigns multiple values to the JSON output.
+	 * However, only the key "value" is accepted.
+	 *
+	 * @param array $values Keys and values - only a value with key "value" is considered
+	 * @return Tx_Fluid_View_AbstractTemplateView the instance of this view to allow chaining
+	 * @author Robert Lemke <robert@typo3.org>
+	 * @api
+	 */
+	public function assignMultiple(array $values) {
+		$templateVariableContainer = $this->baseRenderingContext->getTemplateVariableContainer();
+		foreach ($values as $key => $value) {
+			if ($templateVariableContainer->exists($key)) {
+				$templateVariableContainer->remove($key);
+			}
+			$templateVariableContainer->add($key, $value);
+		}
+		return $this;
+	}
+
+	/**
+	 * Loads the template source and render the template.
+	 * If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout.
+	 *
+	 * @param string $actionName If set, the view of the specified action will be rendered instead. Default is the action specified in the Request object
+	 * @return string Rendered Template
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Robert Lemke <robert@typo3.org>
+	 * @api
+	 */
+	public function render($actionName = NULL) {
+		$this->baseRenderingContext->setControllerContext($this->controllerContext);
+		$this->templateParser->setConfiguration($this->buildParserConfiguration());
+		$parsedTemplate = $this->templateParser->parse($this->getTemplateSource($actionName));
+
+		if ($this->isLayoutDefinedInTemplate($parsedTemplate)) {
+			$this->startRendering(self::RENDERING_LAYOUT, $parsedTemplate, $this->baseRenderingContext);
+			$parsedLayout = $this->templateParser->parse($this->getLayoutSource($this->getLayoutNameInTemplate($parsedTemplate)));
+			$output = $parsedLayout->render($this->baseRenderingContext);
+			$this->stopRendering();
+		} else {
+			$this->startRendering(self::RENDERING_TEMPLATE, $parsedTemplate, $this->baseRenderingContext);
+			$output = $parsedTemplate->render($this->baseRenderingContext);
+			$this->stopRendering();
+		}
+
+		return $output;
+	}
+
+	/**
+	 * Renders a given section.
+	 *
+	 * @param string $sectionName Name of section to render
+	 * @param array the variables to use.
+	 * @return string rendered template for the section
+	 * @throws Tx_Fluid_View_Exception_InvalidSectionException
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderSection($sectionName, array $variables) {
+		$parsedTemplate = $this->getCurrentParsedTemplate();
+
+		$sections = $parsedTemplate->getVariableContainer()->get('sections');
+		if(!array_key_exists($sectionName, $sections)) {
+			throw new Tx_Fluid_View_Exception_InvalidSectionException('The given section does not exist!', 1227108982);
+		}
+		$section = $sections[$sectionName];
+
+		$renderingContext = $this->getCurrentRenderingContext();
+		if ($this->getCurrentRenderingType() === self::RENDERING_LAYOUT) {
+			// in case we render a layout right now, we will render a section inside a TEMPLATE.
+			$renderingTypeOnNextLevel = self::RENDERING_TEMPLATE;
+		} else {
+			$variableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $variables);
+			$renderingContext = clone $renderingContext;
+			$renderingContext->injectTemplateVariableContainer($variableContainer);
+			$renderingTypeOnNextLevel = $this->getCurrentRenderingType();
+		}
+
+		$renderingContext->getViewHelperVariableContainer()->add('Tx_Fluid_ViewHelpers_SectionViewHelper', 'isCurrentlyRenderingSection', 'TRUE');
+
+		$this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
+		$output = $section->evaluate($renderingContext);
+		$this->stopRendering();
+
+		return $output;
+	}
+
+	/**
+	 * Renders a partial.
+	 *
+	 * @param string $partialName
+	 * @param string $sectionName
+	 * @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, $sectionName, array $variables) {
+		$partial = $this->templateParser->parse($this->getPartialSource($partialName));
+		$variableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $variables);
+		$renderingContext = clone $this->getCurrentRenderingContext();
+		$renderingContext->injectTemplateVariableContainer($variableContainer);
+
+		$this->startRendering(self::RENDERING_PARTIAL, $partial, $renderingContext);
+		if ($sectionName !== NULL) {
+			$output = $this->renderSection($sectionName, $variables);
+		} else {
+			$output = $partial->render($renderingContext);
+		}
+		$this->stopRendering();
+
+		return $output;
+	}
+
+	/**
+	 * Resolve the template path and filename for the given action. If $actionName
+	 * is NULL, looks into the current request.
+	 *
+	 * @param string $actionName Name of the action. If NULL, will be taken from request.
+	 * @return string Full path to template
+	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException in case the template was not found
+	 */
+	abstract protected function getTemplateSource($actionName = NULL);
+
+	/**
+	 * Resolve the path and file name of the layout file, based on
+	 * $this->layoutPathAndFilename and $this->layoutPathAndFilenamePattern.
+	 *
+	 * In case a layout has already been set with setLayoutPathAndFilename(),
+	 * this method returns that path, otherwise a path and filename will be
+	 * resolved using the layoutPathAndFilenamePattern.
+	 *
+	 * @param string $layoutName Name of the layout to use. If none given, use "default"
+	 * @return string Path and filename of layout file
+	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
+	 */
+	abstract protected function getLayoutSource($layoutName = 'default');
+
+	/**
+	 * Figures out which partial to use.
+	 *
+	 * @param string $partialName The name of the partial
+	 * @return string the full path which should be used. The path definitely exists.
+	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
+	 */
+	abstract protected function getPartialSource($partialName);
+
+	/**
+	 * Build parser configuration
+	 *
+	 * @return Tx_Fluid_Core_Parser_Configuration
+	 * @author Karsten Dambekalns <karsten@typo3.org>
+	 */
+	protected function buildParserConfiguration() {
+		$parserConfiguration = $this->objectManager->create('Tx_Fluid_Core_Parser_Configuration');
+		if ($this->controllerContext->getRequest()->getFormat() === 'html') {
+			$parserConfiguration->addInterceptor($this->objectManager->get('Tx_Fluid_Core_Parser_Interceptor_Escape'));
+			
+		}
+		return $parserConfiguration;
+	}
+
+	/**
+	 * Returns TRUE if there is a layout defined in the given template via a <f:layout name="..." /> tag.
+	 *
+	 * @param Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate
+	 * @return boolean TRUE if a layout has been defined, FALSE otherwise.
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function isLayoutDefinedInTemplate(Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate) {
+		$variableContainer = $parsedTemplate->getVariableContainer();
+		return ($variableContainer !== NULL && $variableContainer->exists('layoutName'));
+	}
+
+	/**
+	 * Returns the name of the layout defined in the template, if one exists.
+	 *
+	 * @param Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate
+	 * @return string the Layout name
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function getLayoutNameInTemplate(Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate) {
+		if ($this->isLayoutDefinedInTemplate($parsedTemplate)) {
+			return $parsedTemplate->getVariableContainer()->get('layoutName');
+		}
+		return NULL;
+	}
+
+	/**
+	 * Start a new nested rendering. Pushes the given information onto the $renderingStack.
+	 *
+	 * @param int $type one of the RENDERING_* constants
+	 * @param Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate
+	 * @param Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function startRendering($type, Tx_Fluid_Core_Parser_ParsedTemplateInterface $parsedTemplate, Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
+		array_push($this->renderingStack, array('type' => $type, 'parsedTemplate' => $parsedTemplate, 'renderingContext' => $renderingContext));
+	}
+
+	/**
+	 * Stops the current rendering. Removes one element from the $renderingStack. Make sure to always call this
+	 * method pair-wise with startRendering().
+	 *
+	 * @return void
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function stopRendering() {
+		array_pop($this->renderingStack);
+	}
+
+	/**
+	 * Get the current rendering type.
+	 *
+	 * @return one of RENDERING_* constants
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function getCurrentRenderingType() {
+		$currentRendering = end($this->renderingStack);
+		return $currentRendering['type'];
+	}
+
+	/**
+	 * Get the parsed template which is currently being rendered.
+	 *
+	 * @return Tx_Fluid_Core_Parser_ParsedTemplateInterface
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function getCurrentParsedTemplate() {
+		$currentRendering = end($this->renderingStack);
+		return $currentRendering['parsedTemplate'];
+	}
+
+	/**
+	 * Get the rendering context which is currently used.
+	 *
+	 * @return Tx_Fluid_Core_Rendering_RenderingContextInterface
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	protected function getCurrentRenderingContext() {
+		$currentRendering = end($this->renderingStack);
+		return $currentRendering['renderingContext'];
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/View/Exception.php b/typo3/sysext/fluid/Classes/View/Exception.php
index bd0cc11d681191947d9bb125ea0e9ba91db2b151..d53daeb2202b3b583dac7dc3388904e1f859c1bb 100644
--- a/typo3/sysext/fluid/Classes/View/Exception.php
+++ b/typo3/sysext/fluid/Classes/View/Exception.php
@@ -23,9 +23,6 @@
 /**
  * A generic Fluid View exception.
  *
- * @version $Id: Exception.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage View
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php b/typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php
index 15db8b8528f17da197dfa20e8c4619170064fc30..2a69560af045807de26fd9b9ef7ddf58460e1198 100644
--- a/typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php
+++ b/typo3/sysext/fluid/Classes/View/Exception/InvalidSectionException.php
@@ -23,9 +23,6 @@
 /**
  * An "Invalid Section" exception
  *
- * @version $Id$
- * @package Fluid
- * @subpackage View\Exception
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php b/typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php
index 4f0792e0c3dbd23e747143480ffb43f679e3eb49..319ca24924e7612ec048a3cebbf07499e58f89bb 100644
--- a/typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php
+++ b/typo3/sysext/fluid/Classes/View/Exception/InvalidTemplateResourceException.php
@@ -23,9 +23,6 @@
 /**
  * An "Invalid Template Resource" exception
  *
- * @version $Id: InvalidTemplateResourceException.php 3643 2010-01-15 14:38:07Z robert $
- * @package Fluid
- * @subpackage View\Exception
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
diff --git a/typo3/sysext/fluid/Classes/View/TemplateView.php b/typo3/sysext/fluid/Classes/View/TemplateView.php
index 174d2436da908bcef5fc461623e97b2f2dcdafcd..93209cc3edddd69617e17020409ec4d0c6fd6f31 100644
--- a/typo3/sysext/fluid/Classes/View/TemplateView.php
+++ b/typo3/sysext/fluid/Classes/View/TemplateView.php
@@ -23,19 +23,11 @@
 /**
  * The main template view. Should be used as view if you want Fluid Templating
  *
- * @version $Id: TemplateView.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage View
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
  */
-class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implements Tx_Fluid_View_TemplateViewInterface {
-
-	/**
-	 * @var Tx_Fluid_Core_Parser_TemplateParser
-	 */
-	protected $templateParser;
+class Tx_Fluid_View_TemplateView extends Tx_Fluid_View_AbstractTemplateView {
 
 	/**
 	 * Pattern to be resolved for @templateRoot in the other patterns.
@@ -104,31 +96,15 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 	protected $layoutPathAndFilename = NULL;
 
 	public function __construct() {
-						$this->templateParser = Tx_Fluid_Compatibility_TemplateParserBuilder::build();
-						$this->objectManager = t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectManager');
-					}
-	// Here, the backporter can insert a constructor method, which is needed for Fluid v4.
-
-	/**
-	 * Inject the template parser
-	 *
-	 * @param Tx_Fluid_Core_Parser_TemplateParser $templateParser The template parser
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function injectTemplateParser(Tx_Fluid_Core_Parser_TemplateParser $templateParser) {
-		$this->templateParser = $templateParser;
-	}
+			$this->injectTemplateParser(Tx_Fluid_Compatibility_TemplateParserBuilder::build());
+			$this->injectObjectManager(t3lib_div::makeInstance('Tx_Fluid_Compatibility_ObjectManager'));
+			$this->setRenderingContext($this->objectManager->create('Tx_Fluid_Core_Rendering_RenderingContext'));
+		}
 
-	/**
-	 * Initialize view
-	 *
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	public function initializeView() {
-	}
+		public function initializeView() {
+		}
+					
+	// Here, the backporter can insert a constructor method, which is needed for Fluid v4.
 
 	/**
 	 * Sets the path and name of of the template file. Effectively overrides the
@@ -156,66 +132,33 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 	}
 
 	/**
-	 * Build the rendering context
-	 *
-	 * @param Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer
-	 * @return Tx_Fluid_Core_Rendering_RenderingContext
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	protected function buildRenderingContext(Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer = NULL) {
-		if ($variableContainer === NULL) {
-			$variableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', $this->variables);
-		}
-
-		$renderingContext = $this->objectManager->create('Tx_Fluid_Core_Rendering_RenderingContext');
-		$renderingContext->setTemplateVariableContainer($variableContainer);
-		if ($this->controllerContext !== NULL) {
-			$renderingContext->setControllerContext($this->controllerContext);
-		}
-
-		$viewHelperVariableContainer = $this->objectManager->create('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
-		$viewHelperVariableContainer->setView($this);
-		$renderingContext->setViewHelperVariableContainer($viewHelperVariableContainer);
-
-		return $renderingContext;
-	}
-
-	/**
-	 * Build parser configuration
+	 * Checks whether a template can be resolved for the current request context.
 	 *
-	 * @return Tx_Fluid_Core_Parser_Configuration
+	 * @return boolean
 	 * @author Karsten Dambekalns <karsten@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @api
 	 */
-	protected function buildParserConfiguration() {
-		$parserConfiguration = $this->objectManager->create('Tx_Fluid_Core_Parser_Configuration');
-		if ($this->controllerContext->getRequest()->getFormat() === 'html') {
-			$parserConfiguration->addInterceptor($this->objectManager->get('Tx_Fluid_Core_Parser_Interceptor_Escape'));
-
+	public function hasTemplate() {
+		try {
+			$this->getTemplateSource();
+			return TRUE;
+		} catch (Tx_Fluid_View_Exception_InvalidTemplateResourceException $e) {
+			return FALSE;
 		}
-		return $parserConfiguration;
 	}
 
-	/**
-	 * Find the XHTML template according to $this->templatePathAndFilenamePattern and render the template.
-	 * If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout.
+		/**
+	 * Set the root path to the templates.
+	 * If set, overrides the one determined from $this->templateRootPathPattern
 	 *
-	 * @param string $actionName If set, the view of the specified action will be rendered instead. Default is the action specified in the Request object
-	 * @return string Rendered Template
+	 * @param string $templateRootPath Root path to the templates. If set, overrides the one determined from $this->templateRootPathPattern
+	 * @return void
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @api
 	 */
-	public function render($actionName = NULL) {
-		$templatePathAndFilename = $this->resolveTemplatePathAndFilename($actionName);
-
-		$this->templateParser->setConfiguration($this->buildParserConfiguration());
-		$parsedTemplate = $this->parseTemplate($templatePathAndFilename);
-
-		$variableContainer = $parsedTemplate->getVariableContainer();
-		if ($variableContainer !== NULL && $variableContainer->exists('layoutName')) {
-			return $this->renderWithLayout($variableContainer->get('layoutName'));
-		}
-
-		return $parsedTemplate->render($this->buildRenderingContext());
+	public function setTemplateRootPath($templateRootPath) {
+		$this->templateRootPath = $templateRootPath;
 	}
 
 	/**
@@ -227,68 +170,39 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	protected function resolveTemplatePathAndFilename($actionName = NULL) {
+	protected function getTemplateSource($actionName = NULL) {
 		if ($this->templatePathAndFilename !== NULL) {
-			return $this->templatePathAndFilename;
-		}
-
-		$actionName = ($actionName !== NULL ? $actionName : $this->controllerContext->getRequest()->getControllerActionName());
-		$actionName = ucfirst($actionName);
-
-		$paths = $this->expandGenericPathPattern($this->templatePathAndFilenamePattern, FALSE, FALSE);
-
-		foreach ($paths as &$path) {
-			// TODO remove fallback to lower case template files after grace period
-			$fallbackPath = str_replace('@action', strtolower($actionName), $path);
-			$path = str_replace('@action', $actionName, $path);
-			if (file_exists($path)) {
-				return $path;
-			} else {
-				if (file_exists($fallbackPath)) {
-					t3lib_div::deprecationLog('the template filename "' . $fallbackPath . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($path) . '"');
-					return $fallbackPath;
+			$templatePathAndFilename = $this->templatePathAndFilename;
+		} else {
+			$actionName = ($actionName !== NULL ? $actionName : $this->controllerContext->getRequest()->getControllerActionName());
+			$actionName = ucfirst($actionName);
+
+			$paths = $this->expandGenericPathPattern($this->templatePathAndFilenamePattern, FALSE, FALSE);
+			$found = FALSE;
+			foreach ($paths as &$templatePathAndFilename) {
+				// These tokens are replaced by the Backporter for the graceful fallback in version 4.
+				$fallbackPath = str_replace('@action', strtolower($actionName), $templatePathAndFilename);
+				$templatePathAndFilename = str_replace('@action', $actionName, $templatePathAndFilename);
+				if (file_exists($templatePathAndFilename)) {
+					$found = TRUE;
+					break;
+				}  elseif (file_exists($fallbackPath)) {
+					$found = TRUE;
+					$templatePathAndFilename = $fallbackPath;
+					t3lib_div::deprecationLog('the template filename "' . $fallbackPath . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($templatePathAndFilename) . '"');
+					break;
 				}
 			}
+			if (!$found) {
+				throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595);
+			}
 		}
-		throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595);
-	}
-
-	/**
-	 * Renders a given section.
-	 *
-	 * @param string $sectionName Name of section to render
-	 * @return string rendered template for the section
-	 * @throws Tx_Fluid_View_Exception_InvalidSectionException
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function renderSection($sectionName) {
-		$parsedTemplate = $this->parseTemplate($this->resolveTemplatePathAndFilename());
 
-		$sections = $parsedTemplate->getVariableContainer()->get('sections');
-		if(!array_key_exists($sectionName, $sections)) {
-			throw new Tx_Fluid_View_Exception_InvalidSectionException('The given section does not exist!', 1227108982);
+		$templateSource = file_get_contents($templatePathAndFilename);
+		if ($templateSource === FALSE) {
+			throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('"' . $templatePathAndFilename . '" is not a valid template resource URI.', 1257246929);
 		}
-		$section = $sections[$sectionName];
-
-		$renderingContext = $this->buildRenderingContext();
-		$section->setRenderingContext($renderingContext);
-		return $section->evaluate();
-	}
-
-	/**
-	 * Render a template with a given layout.
-	 *
-	 * @param string $layoutName Name of layout
-	 * @return string rendered HTML
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function renderWithLayout($layoutName) {
-		$parsedTemplate = $this->parseTemplate($this->resolveLayoutPathAndFilename($layoutName));
-
-		$renderingContext = $this->buildRenderingContext();
-		return $parsedTemplate->render($renderingContext);
+		return $templateSource;
 	}
 
 	/**
@@ -304,41 +218,30 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	protected function resolveLayoutPathAndFilename($layoutName = 'default') {
-		if ($this->layoutPathAndFilename) {
-			return $this->layoutPathAndFilename;
-		}
+	protected function getLayoutSource($layoutName = 'default') {
+		if ($this->layoutPathAndFilename !== NULL) {
+			 $layoutPathAndFilename = $this->layoutPathAndFilename;
+		} else {
+			$paths = $this->expandGenericPathPattern($this->layoutPathAndFilenamePattern, TRUE, TRUE);
+			$found = FALSE;
+			foreach ($paths as &$layoutPathAndFilename) {
+				$layoutPathAndFilename = str_replace('@layout', $layoutName, $layoutPathAndFilename);
+				if (file_exists($layoutPathAndFilename)) {
+					$found = TRUE;
+					break;
+				}
+			}
 
-		$paths = $this->expandGenericPathPattern($this->layoutPathAndFilenamePattern, TRUE, TRUE);
-		foreach ($paths as &$path) {
-			$path = str_replace('@layout', $layoutName, $path);
-			if (file_exists($path)) {
-				return $path;
+			if (!$found) {
+				throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
 			}
 		}
-		throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
-	}
 
-	/**
-	 * Renders a partial.
-	 *
-	 * @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, $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);
+		$layoutSource = file_get_contents($layoutPathAndFilename);
+		if ($layoutSource === FALSE) {
+			throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('"' . $layoutPathAndFilename . '" is not a valid template resource URI.', 1257246929);
 		}
-		return $partial->render($renderingContext);
+		return $layoutSource;
 	}
 
 	/**
@@ -349,63 +252,24 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	protected function resolvePartialPathAndFilename($partialName) {
+	protected function getPartialSource($partialName) {
 		$paths = $this->expandGenericPathPattern($this->partialPathAndFilenamePattern, TRUE, TRUE);
-		foreach ($paths as &$path) {
-			$path = str_replace('@partial', $partialName, $path);
-			if (file_exists($path)) {
-				return $path;
+		$found = FALSE;
+		foreach ($paths as &$partialPathAndFilename) {
+			$partialPathAndFilename = str_replace('@partial', $partialName, $partialPathAndFilename);
+			if (file_exists($partialPathAndFilename)) {
+				$found = TRUE;
+				break;
 			}
 		}
-		throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
-	}
-
-	/**
-	 * Checks whether a template can be resolved for the current request context.
-	 *
-	 * @return boolean
-	 * @author Karsten Dambekalns <karsten@typo3.org>
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	public function hasTemplate() {
-		try {
-			$this->resolveTemplatePathAndFilename();
-			return TRUE;
-		} catch (Tx_Fluid_View_Exception_InvalidTemplateResourceException $e) {
-			return FALSE;
+		if (!$found) {
+			throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
 		}
-	}
-
-	/**
-	 * Parse the given template and return it.
-	 *
-	 * Will cache the results for one call.
-	 *
-	 * @param string $templatePathAndFilename absolute filename of the template to be parsed
-	 * @return Tx_Fluid_Core_Parser_ParsedTemplateInterface the parsed template tree
-	 * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	protected function parseTemplate($templatePathAndFilename) {
-		$templateSource = file_get_contents($templatePathAndFilename);
-		if ($templateSource === FALSE) {
-			throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('"' . $templatePathAndFilename . '" is not a valid template resource URI.', 1257246929);
+		$partialSource = file_get_contents($partialPathAndFilename);
+		if ($partialSource === FALSE) {
+			throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('"' . $partialPathAndFilename . '" is not a valid template resource URI.', 1257246929);
 		}
-		return $this->templateParser->parse($templateSource);
-	}
-
-	/**
-	 * Set the root path to the templates.
-	 * If set, overrides the one determined from $this->templateRootPathPattern
-	 *
-	 * @param string $templateRootPath Root path to the templates. If set, overrides the one determined from $this->templateRootPathPattern
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	public function setTemplateRootPath($templateRootPath) {
-		$this->templateRootPath = $templateRootPath;
+		return $partialSource;
 	}
 
 	/**
@@ -535,6 +399,7 @@ class Tx_Fluid_View_TemplateView extends Tx_Extbase_MVC_View_AbstractView implem
 
 		return $results;
 	}
+
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/View/TemplateViewInterface.php b/typo3/sysext/fluid/Classes/View/TemplateViewInterface.php
index ef3ea75eb06c3a50f0070cd28fcf175761e778e5..dc257410e07e52f4bfee4c35ef5def435f32931d 100644
--- a/typo3/sysext/fluid/Classes/View/TemplateViewInterface.php
+++ b/typo3/sysext/fluid/Classes/View/TemplateViewInterface.php
@@ -23,51 +23,11 @@
 /**
  * Interface of Fluids Template view
  *
- * @version $Id: TemplateViewInterface.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage View
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  */
 interface Tx_Fluid_View_TemplateViewInterface extends Tx_Extbase_MVC_View_ViewInterface {
 
-	/**
-	 * Sets the path and name of of the template file. Effectively overrides the
-	 * dynamic resolving of a template file.
-	 *
-	 * @param string $templatePathAndFilename Template file path
-	 * @return void
-	 * @api
-	 */
-	public function setTemplatePathAndFilename($templatePathAndFilename);
-
-	/**
-	 * Sets the path and name of the layout file. Overrides the dynamic resolving of the layout file.
-	 *
-	 * @param string $layoutPathAndFilename Path and filename of the layout file
-	 * @return void
-	 * @api
-	 */
-	public function setLayoutPathAndFilename($layoutPathAndFilename);
-
-	/**
-	 * Renders a given section.
-	 *
-	 * @param string $sectionName Name of section to render
-	 * @return rendered template for the section
-	 * @api
-	 */
-	public function renderSection($sectionName);
-
-	/**
-	 * Render a template with a given layout.
-	 *
-	 * @param string $layoutName Name of layout
-	 * @return string rendered HTML
-	 * @api
-	 */
-	public function renderWithLayout($layoutName);
-
 	/**
 	 * Checks whether a template can be resolved for the current request context.
 	 *
@@ -77,4 +37,4 @@ interface Tx_Fluid_View_TemplateViewInterface extends Tx_Extbase_MVC_View_ViewIn
 	public function hasTemplate();
 
 }
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php
index 75277eb18c5d0fa0539f588f44022cc4829971cb..4bbed40f91e2911e34a7a3836bd9fb7c6111879a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/AliasViewHelper.php
@@ -46,9 +46,6 @@
  * depending on {foo.bar.baz}
  * </output>
  *
- * @version $Id: AliasViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -57,7 +54,7 @@ class Tx_Fluid_ViewHelpers_AliasViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 
 	/**
 	 *
-	 * @param array $map
+	 * @param array $map 
 	 * @return string Rendered string
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 * @api
@@ -74,4 +71,4 @@ class Tx_Fluid_ViewHelpers_AliasViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
index db445e745cab403c19822da3cad71e880c2a7703..dc32a414aa0dd9ea86e0cbe27cfa788d6769ea37 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
@@ -35,9 +35,6 @@
  * (depending on your domain)
  * </output>
  *
- * @version $Id: BaseViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -59,4 +56,4 @@ class Tx_Fluid_ViewHelpers_BaseViewHelper extends Tx_Fluid_Core_ViewHelper_Abstr
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
index d5b60dbb05e66dcd388a4e33cfa1717fa7007164..2e0e6f6bef60c7667dd02912c80684aa9e51fbf3 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
@@ -27,8 +27,6 @@
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be
  * @author      Steffen Kamper <info@sk-typo3.de>
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
index 4f380dfc28145e84c69ca1a8dc553b080b6ca135..15ba9fa4992651aa1026879cfa339e62c1732499 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
@@ -36,8 +36,6 @@
  * CSH button as known from the TYPO3 backend.
  *
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be\Buttons
  * @author		Steffen Kamper <info@sk-typo3.de>
  * @author		Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php
index 652b8c36cb17d60b2391303ad96709eb2045a80b..a8433215d91e7b9037b2057f6eddb80f55516cec 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php
@@ -40,8 +40,6 @@
  * Output:
  * This time the "new_el" icon is returned, the button has the title attribute set and links to the "new" action of the current controller.
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be\Buttons
  * @author		Steffen Kamper <info@sk-typo3.de>
  * @author		Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php
index 57df3d7117e0516a75ab095dfbe418fa745ad577..c7906ea4ed9690215eba2fe039fda2dbd3f585a3 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php
@@ -43,8 +43,6 @@
  * Note:
  * Normally you won't need to set getVars & setVars parameters in Extbase modules
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be\Buttons
  * @author		Steffen Kamper <info@sk-typo3.de>
  * @author		Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php
index 8b3f6b745b79ce84f4e235183fab9bee606ef2e8..6b1cbfedb2272702c770b3d32a1fa2e0126f713b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php
@@ -41,8 +41,6 @@
  * "your module content" wrapped with propper head & body tags.
  * Custom CSS file EXT:your_extension/Resources/Public/styles/backend.css and JavaScript file EXT:your_extension/Resources/Public/scripts/main.js will be loaded
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
  * @version     SVN: $Id:
@@ -106,8 +104,8 @@ class Tx_Fluid_ViewHelpers_Be_ContainerViewHelper extends Tx_Fluid_ViewHelpers_B
 			$pageRenderer->addJsFile($addJsFile);
 		}
 
-		$output = $doc->startPage($pageTitle);
-		$output .= $this->renderChildren();
+		$output = $this->renderChildren();
+		$output = $doc->startPage($pageTitle) . $output;
 		$output .= $doc->endPage();
 		return $output;
 	}
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php
index d6875b51e40ed31592749bc4b25f0c33df8aa33c..bf35746790113ab893c58f6f4426baa1fddbbb98 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php
@@ -25,14 +25,12 @@
  * Note: This view helper is experimental!
  *
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be\Menus
  * @author      Steffen Kamper <info@sk-typo3.de>
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
  * @version     SVN: $Id:
  */
-class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuItemViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuItemViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var string
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php
index b2b493f96396f7851f633483371caca2ce310224..60056f2c477b54fdde70d61edc04245c8fdab605 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php
@@ -44,15 +44,13 @@
  * </f:be.menus.actionMenu>
  * </code>
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be\Menus
  * @author      Steffen Kamper <info@sk-typo3.de>
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
  * @version     SVN: $Id:
  *
  */
-class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
+class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
 
 	/**
 	 * @var string
@@ -65,11 +63,6 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
 	 */
 	protected $childNodes = array();
 
-	/**
-	 * @var Tx_Fluid_Core_Rendering_RenderingContext
-	 */
-	protected $renderingContext;
-
 	/**
 	 * Setter for ChildNodes - as defined in ChildNodeAccessInterface
 	 *
@@ -82,15 +75,6 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
 		$this->childNodes = $childNodes;
 	}
 
-	/**
-	 * Sets the rendering context which needs to be passed on to child nodes
-	 *
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext the renderingcontext to use
-	 */
-	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext) {
-		$this->renderingContext = $renderingContext;
-	}
-
 	/**
 	 * Render FunctionMenu
 	 *
@@ -102,8 +86,7 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
 		$options = '';
 		foreach ($this->childNodes as $childNode) {
 			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode) {
-				$childNode->setRenderingContext($this->renderingContext);
-				$options .= $childNode->evaluate();
+				$options .= $childNode->evaluate($this->getRenderingContext());
 			}
 		}
 		$this->tag->setContent($options);
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
index d9c1abaf6fb0f6c77bfcdd55acfdcb82af5bf72c..5fc3ed3342e0986284d86094938fea0d92d34932 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
@@ -32,8 +32,6 @@
  * Output:
  * Page info icon with context menu
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be
  * @author      Steffen Kamper <info@sk-typo3.de>
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php
index 08bba124efee114151c44c5bc6634597600bdd63..a4bbec181b6b82e13ea9858eca57cc4eaf610eaf 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php
@@ -33,8 +33,6 @@
  * Current page path, prefixed with "Path:" and wrapped in a span with the class "typo3-docheader-pagePath"
  *
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be
  * @author      Steffen Kamper <info@sk-typo3.de>
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
index a71b9a8c73352c1383e0686bb976fcea421eadc8..bc866db4a95aeee9ee09fbbc5a646badc433961b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
@@ -43,8 +43,6 @@
  * List of "Website user" records with a text property of "foo" stored on PID 1 and two levels down.
  * Clicking on a username will open the TYPO3 info popup for the respective record
  *
- * @package     Fluid
- * @subpackage  ViewHelpers\Be
  * @author      Bastian Waidelich <bastian@typo3.org>
  * @license     http://www.gnu.org/copyleft/gpl.html
  * @version     SVN: $Id:
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
index a6c5b8041c571446a1213b669f838de0771d8a7f..15fbbb7eea7f81487125aa45e240328e0d509ded 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
@@ -16,9 +16,6 @@
 /**
  * This class is a TypoScript view helper for the Fluid templating engine.
  *
- * @package TYPO3
- * @subpackage Fluid
- * @version $Id: CObjectViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
 class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
@@ -32,6 +29,11 @@ class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 	 */
 	protected $typoScriptSetup;
 
+	/**
+	 * @var	t3lib_fe contains a backup of the current $GLOBALS['TSFE'] if used in BE mode
+	 */
+	protected $tsfeBackup;
+
 	/**
 	 * Constructor. Used to create an instance of tslib_cObj used by the render() method.
 	 *
@@ -48,10 +50,6 @@ class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 			$configurationManager = Tx_Extbase_Dispatcher::getConfigurationManager();
 			$this->typoScriptSetup = $configurationManager->loadTypoScriptSetup();
 		}
-		if (TYPO3_MODE === 'BE') {
-				// this is a hacky work around to enable this view helper for backend mode
-			$GLOBALS['TSFE']->cObjectDepthCounter = 100;
-		}
 	}
 
 	/**
@@ -65,6 +63,10 @@ class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 	 * @author Niels Pardon <mail@niels-pardon.de>
 	 */
 	public function render($typoscriptObjectPath, $data = NULL, $currentValueKey = NULL) {
+		if (TYPO3_MODE === 'BE') {
+			$this->simulateFrontendEnvironment();
+		}
+
 		if ($data === NULL) {
 			$data = $this->renderChildren();
 		}
@@ -91,7 +93,37 @@ class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 			}
 			$setup = $setup[$segment . '.'];
 		}
-		return $this->contentObject->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.']);
+		$content = $this->contentObject->cObjGetSingle($setup[$lastSegment], $setup[$lastSegment . '.']);
+
+		if (TYPO3_MODE === 'BE') {
+			$this->resetFrontendEnvironment();
+		}
+
+		return $content;
+	}
+
+	/**
+	 * Sets the $TSFE->cObjectDepthCounter in Backend mode
+	 * This somewhat hacky work around is currently needed because the cObjGetSingle() function of tslib_cObj relies on this setting
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function simulateFrontendEnvironment() {
+		$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
+		$GLOBALS['TSFE'] = new stdClass();
+		$GLOBALS['TSFE']->cObjectDepthCounter = 100;
+	}
+
+	/**
+	 * Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @see simulateFrontendEnvironment()
+	 */
+	protected function resetFrontendEnvironment() {
+		$GLOBALS['TSFE'] = $this->tsfeBackup;
 	}
 }
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php
index c32a1e26bad70eed2d57d18f15b6b72bb7562351..c588d5064fbb4e553916e57e3832b40b506b498b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php
@@ -1,24 +1,40 @@
 <?php
 
 /*                                                                        *
- * This script is part of the TYPO3 project - inspiring people to share!  *
+ * This script belongs to the FLOW3 package "Fluid".                      *
  *                                                                        *
- * TYPO3 is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU General Public License version 2 as published by  *
- * the Free Software Foundation.                                          *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
  *                                                                        *
  * This script is distributed in the hope that it will be useful, but     *
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
- * Public License for more details.                                       *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
 /**
- * Counts the number of elements of a given property
+ * This ViewHelper counts elements of the specified array or countable object.
+ *
+ * = Examples =
  *
- * @package TYPO3
- * @subpackage Fluid
- * @version $Id: CountViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
+ * <code title="Count array elements">
+ * <f:count subject="{0:1, 1:2, 2:3, 3:4}" />
+ * </code>
+ * <output>
+ * 4
+ * </output>
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
+ * @scope prototype
  */
 class Tx_Fluid_ViewHelpers_CountViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
@@ -26,12 +42,17 @@ class Tx_Fluid_ViewHelpers_CountViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 	 * Counts the items of a given property.
 	 *
 	 * @param array $subject The array or ObjectStorage to iterated over
-	 * @return string The bumber of elements
+	 * @return integer The number of elements
 	 * @author Jochen Rau <jochen.rau@typoplanet.de>
+	 * @author Bastian Waidelich <bastian@typo3.org>
 	 * @api
 	 */
 	public function render($subject) {
+		if (is_object($subject) && !$subject instanceof Countable) {
+			throw new Tx_Fluid_Core_ViewHelper_Exception('CountViewHelper only supports arrays and objects implementing Countable interface', 1279808078);
+		}
 		return count($subject);
 	}
 }
-?>
\ No newline at end of file
+
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php
index 025dd4997ccf28f5bb103d7051402bfae5313849..308d4500736d534c87ddc6fdcfef709cfd60c4c0 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/CycleViewHelper.php
@@ -51,9 +51,6 @@
  * </ul>
  * </output>
  *
- * @version $Id: CycleViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -61,7 +58,7 @@
 class Tx_Fluid_ViewHelpers_CycleViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
 	/**
-	 * @var array|\SplObjectStorage the values to be iterated through
+	 * @var array|Tx_Extbase_Persistence_ObjectStorage the values to be iterated through
 	 */
 	protected $values = NULL;
 
@@ -71,7 +68,7 @@ class Tx_Fluid_ViewHelpers_CycleViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 	protected $currentCycleIndex = NULL;
 
 	/**
-	 * @param array $values The array or SplObjectStorage to iterated over
+	 * @param array $values The array or Tx_Extbase_Persistence_ObjectStorage to iterated over
 	 * @param string $as The name of the iteration variable
 	 * @return string Rendered result
 	 * @author Bastian Waidelich <bastian@typo3.org>
@@ -101,7 +98,7 @@ class Tx_Fluid_ViewHelpers_CycleViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 	/**
 	 * Sets this->values to the current values argument and resets $this->currentCycleIndex.
 	 *
-	 * @param array $values The array or SplObjectStorage to be stored in $this->values
+	 * @param array $values The array or Tx_Extbase_Persistence_ObjectStorage to be stored in $this->values
 	 * @return void
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
@@ -110,28 +107,12 @@ class Tx_Fluid_ViewHelpers_CycleViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 			if (!$values instanceof Traversable) {
 				throw new Tx_Fluid_Core_ViewHelper_Exception('CycleViewHelper only supports arrays and objects implementing Traversable interface' , 1248728393);
 			}
-			$this->values = $this->convertToArray($values);
+			$this->values = iterator_to_array($values, FALSE);
 		} else {
 			$this->values = array_values($values);
 		}
 		$this->currentCycleIndex = 0;
 	}
-
-	/**
-	 * Turns the given object into an array.
-	 * The object has to implement the Traversable interface
-	 *
-	 * @param Traversable $object The object to be turned into an array. If the object implements Iterator the key will NOT be preserved.
-	 * @return array The resulting array
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	protected function convertToArray(Traversable $object) {
-		$array = array();
-		foreach ($object as $singleElement) {
-			$array[] = $singleElement;
-		}
-		return $array;
-	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php
index 6553502497cffc3b7f23acfbfb51259359810ecf..f2daa987ab13414b60398ad5793ceb5d37e049df 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/DebugViewHelper.php
@@ -15,9 +15,6 @@
 
 /**
  *
- * @package
- * @subpackage
- * @version $Id: DebugViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
 class Tx_Fluid_ViewHelpers_DebugViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
@@ -25,7 +22,7 @@ class Tx_Fluid_ViewHelpers_DebugViewHelper extends Tx_Fluid_Core_ViewHelper_Abst
 	 * Wrapper for TYPO3s famous debug()
 	 *
 	 * @param string $title
-	 * @return string the altered string.
+	 * @return string the altered string. 
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
 	public function render($title = NULL) {
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
index 9f1b7301c5d55e0b1a2e9e55aed426d6165f2dcf..85d217d1ae9ad54e4860d70f835f0267281ac6d0 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/ElseViewHelper.php
@@ -22,12 +22,9 @@
 
 /**
  * Else-Branch of a condition. Only has an effect inside of "If". See the If-ViewHelper for documentation.
- *
+ * 
  * @see Tx_Fluid_ViewHelpers_IfViewHelper
  *
- * @version $Id: ElseViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -44,4 +41,4 @@ class Tx_Fluid_ViewHelpers_ElseViewHelper extends Tx_Fluid_Core_ViewHelper_Abstr
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php
index 52088d80ca80a74f1322a0006130c16f9b3d1743..7362e5e9c0673284ecdefb19d1f04c44c7db5862 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/EscapeViewHelper.php
@@ -47,9 +47,6 @@
  * Output:
  * Text encoded for URL use (rawurlencode applied).
  *
- * @version $Id: EscapeViewHelper.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
index 28fdeced1fa8851b5a8910b7e7d4221e0158c22f..b1ba18da8acc55589dd49ddea4b22eca51660f40 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
@@ -42,14 +42,11 @@
  *  ...
  * </ul>
  *
- * @version $Id: ForViewHelper.php 2914 2009-07-28 18:26:38Z bwaidelich $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
  */
-class Tx_Fluid_ViewHelpers_FlashMessagesViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_FlashMessagesViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var string
@@ -60,7 +57,7 @@ class Tx_Fluid_ViewHelpers_FlashMessagesViewHelper extends Tx_Fluid_Core_ViewHel
 	 * Initialize arguments
 	 *
 	 * @return void
-	 * @author Sebastian Kurfürst <sbastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @api
 	 */
 	public function initializeArguments() {
@@ -71,7 +68,7 @@ class Tx_Fluid_ViewHelpers_FlashMessagesViewHelper extends Tx_Fluid_Core_ViewHel
 	 * Render method.
 	 *
 	 * @return string rendered Flash Messages, if there are any.
-	 * @author Sebastian Kurfürst <sbastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @api
 	 */
 	public function render() {
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php
index 262d9aaa31f699ae4eac1674ea71b9b995cc698e..febfb7a84c2f928a8b2c39ae8e357b0e8347148a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/ForViewHelper.php
@@ -49,9 +49,22 @@
  * </ul>
  * </output>
  *
- * @version $Id: ForViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
+ * <code title="Iteration information">
+ * <ul>
+ *   <f:for each="{0:1, 1:2, 2:3, 3:4}" as="foo" iteration="fooIterator">
+ *     <li>Index: {fooIterator.index} Cycle: {fooIterator.cycle} Total: {fooIterator.total}{f:if(condition: fooIterator.isEven, then: ' Even')}{f:if(condition: fooIterator.isOdd, then: ' Odd')}{f:if(condition: fooIterator.isFirst, then: ' First')}{f:if(condition: fooIterator.isLast, then: ' Last')}</li>
+ *   </f:for>
+ * </ul>
+ * </code>
+ * <output>
+ * <ul>
+ *   <li>Index: 0 Cycle: 1 Total: 4 Odd First</li>
+ *   <li>Index: 1 Cycle: 2 Total: 4 Even</li>
+ *   <li>Index: 2 Cycle: 3 Total: 4 Odd</li>
+ *   <li>Index: 3 Cycle: 4 Total: 4 Even Last</li>
+ * </ul>
+ * </output>
+ *
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -61,31 +74,38 @@ class Tx_Fluid_ViewHelpers_ForViewHelper extends Tx_Fluid_Core_ViewHelper_Abstra
 	/**
 	 * Iterates through elements of $each and renders child nodes
 	 *
-	 * @param array $each The array or SplObjectStorage to iterated over
+	 * @param array $each The array or Tx_Extbase_Persistence_ObjectStorage to iterated over
 	 * @param string $as The name of the iteration variable
 	 * @param string $key The name of the variable to store the current array key
 	 * @param boolean $reverse If enabled, the iterator will start with the last element and proceed reversely
+	 * @param string $iteration The name of the variable to store iteration information (index, cycle, isFirst, isLast, isEven, isOdd)
 	 * @return string Rendered string
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 * @author Robert Lemke <robert@typo3.org>
 	 * @api
 	 */
-	public function render($each, $as, $key = '', $reverse = FALSE) {
+	public function render($each, $as, $key = '', $reverse = FALSE, $iteration = NULL) {
 		$output = '';
 		if ($each === NULL) {
 			return '';
 		}
-		if (is_object($each)) {
-			if (!$each instanceof Traversable) {
-				throw new Tx_Fluid_Core_ViewHelper_Exception('ForViewHelper only supports arrays and objects implementing Traversable interface' , 1248728393);
-			}
-			$each = $this->convertToArray($each);
+		if (is_object($each) && !$each instanceof Traversable) {
+			throw new Tx_Fluid_Core_ViewHelper_Exception('ForViewHelper only supports arrays and objects implementing Traversable interface' , 1248728393);
 		}
 
 		if ($reverse === TRUE) {
+				// array_reverse only supports arrays
+			if (is_object($each)) {
+				$each = iterator_to_array($each);
+			}
 			$each = array_reverse($each);
 		}
+		$iterationData = array(
+			'index' => 0,
+			'cycle' => 1,
+			'total' => count($each)
+		);
 
 		$output = '';
 		foreach ($each as $keyValue => $singleElement) {
@@ -93,30 +113,26 @@ class Tx_Fluid_ViewHelpers_ForViewHelper extends Tx_Fluid_Core_ViewHelper_Abstra
 			if ($key !== '') {
 				$this->templateVariableContainer->add($key, $keyValue);
 			}
+			if ($iteration !== NULL) {
+				$iterationData['isFirst'] = $iterationData['cycle'] === 1;
+				$iterationData['isLast'] = $iterationData['cycle'] === $iterationData['total'];
+				$iterationData['isEven'] = $iterationData['cycle'] % 2 === 0;
+				$iterationData['isOdd'] = !$iterationData['isEven'];
+				$this->templateVariableContainer->add($iteration, $iterationData);
+				$iterationData['index'] ++;
+				$iterationData['cycle'] ++;
+			}
 			$output .= $this->renderChildren();
 			$this->templateVariableContainer->remove($as);
 			if ($key !== '') {
 				$this->templateVariableContainer->remove($key);
 			}
+			if ($iteration !== NULL) {
+				$this->templateVariableContainer->remove($iteration);
+			}
 		}
 		return $output;
 	}
-
-	/**
-	 * Turns the given object into an array.
-	 * The object has to implement the Traversable interface
-	 *
-	 * @param Traversable $object The object to be turned into an array. If the object implements Iterator the key will be preserved.
-	 * @return array The resulting array
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	protected function convertToArray(Traversable $object) {
-		$array = array();
-		foreach ($object as $keyValue => $singleElement) {
-			$array[$keyValue] = $singleElement;
-		}
-		return $array;
-	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
index a9902676ea24f43fd4c2dc4a343147da7a3e82a6..1609d5129b037959ac45bec32b41a6a48222c768 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
@@ -26,9 +26,6 @@
  * If you set the "property" attribute to the name of the property to resolve from the object, this class will
  * automatically set the name and value of a form element.
  *
- * @version $Id: AbstractFormFieldViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -63,14 +60,14 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper extends Tx_
 	 */
 	protected function getName() {
 		if ($this->isObjectAccessorMode()) {
-			$formName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
-			if (!empty($formName)) {
+			$formObjectName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
+			if (!empty($formObjectName)) {
 				$propertySegments = explode('.', $this->arguments['property']);
 				$properties = '';
 				foreach ($propertySegments as $segment) {
 					$properties .= '[' . $segment . ']';
 				}
-				$name = $formName . $properties;
+				$name = $formObjectName . $properties;
 			} else {
 				$name = $this->arguments['property'];
 			}
@@ -125,7 +122,7 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper extends Tx_
 			// hierarchical property. If there is no "." inside (thus $propertySegments == 1), we do not need to do anything
 			$formObject = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject');
 
-			$objectName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
+			$objectName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
 			// If Count == 2 -> we need to go through the for-loop exactly once
 			for ($i=1; $i < count($propertySegments); $i++) {
 				$object = Tx_Extbase_Reflection_ObjectAccess::getPropertyPath($formObject, implode('.', array_slice($propertySegments, 0, $i)));
@@ -164,7 +161,7 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper extends Tx_
 	 */
 	protected function isObjectAccessorMode() {
 		return $this->arguments->hasArgument('property')
-			&& $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
+			&& $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
 	}
 
 	/**
@@ -203,11 +200,11 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper extends Tx_
 			return array();
 		}
 		$errors = $this->controllerContext->getRequest()->getErrors();
-		$formName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
+		$formObjectName = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
 		$propertyName = $this->arguments['property'];
 		$formErrors = array();
 		foreach ($errors as $error) {
-			if ($error instanceof Tx_Extbase_Validation_PropertyError && $error->getPropertyName() === $formName) {
+			if ($error instanceof Tx_Extbase_Validation_PropertyError && $error->getPropertyName() === $formObjectName) {
 				$formErrors = $error->getErrors();
 				foreach ($formErrors as $formError) {
 					if ($formError instanceof Tx_Extbase_Validation_PropertyError && $formError->getPropertyName() === $propertyName) {
@@ -218,6 +215,33 @@ abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper extends Tx_
 		}
 		return array();
 	}
+
+	/**
+	 * Renders a hidden field with the same name as the element, to make sure the empty value is submitted
+	 * in case nothing is selected. This is needed for checkbox and multiple select fields
+	 *
+	 * @return string the hidden field.
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function renderHiddenFieldForEmptyValue() {
+		$hiddenFieldNames = array();
+		if ($this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')) {
+			$hiddenFieldNames = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields');
+		}
+
+		$fieldName = $this->getName();
+		if (substr($fieldName, -2) === '[]') {
+			$fieldName = substr($fieldName, 0, -2);
+		}
+		if (!in_array($fieldName, $hiddenFieldNames)) {
+			$hiddenFieldNames[] = $fieldName;
+			$this->viewHelperVariableContainer->addOrUpdate('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields', $hiddenFieldNames);
+
+			return '<input type="hidden" name="' . htmlspecialchars($fieldName) . '" value="" />';
+		}
+		return '';
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
index 857ac692084b35c8470d901a7ce4f8759e7bd17f..f2e0be46bdb79efcac40e198b51c5bc57c281eb2 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php
@@ -26,16 +26,13 @@
  * If you set the "property" attribute to the name of the property to resolve from the object, this class will
  * automatically set the name and value of a form element.
  *
- * @version $Id: AbstractFormViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
-abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+abstract class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
-	 * @var \Tx_Extbase_Persistence_ManagerInterface
+	 * @var Tx_Extbase_Persistence_ManagerInterface
 	 */
 	protected $persistenceManager;
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php
index aaf808993692e8271857c40514397f17404407de..f00dffa3c2304768e882b6079a0fc870b19ac22d 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php
@@ -48,9 +48,6 @@
  * <input type="checkbox" name="user[interests][]" value="TYPO3" checked="checked" />
  * (depending on property "interests")
  *
- * @version $Id: CheckboxViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -73,7 +70,7 @@ class Tx_Fluid_ViewHelpers_Form_CheckboxViewHelper extends Tx_Fluid_ViewHelpers_
 		parent::initializeArguments();
 		$this->registerTagAttribute('disabled', 'string', 'Specifies that the input element should be disabled when the page loads');
 		$this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this view helper', FALSE, 'f3-form-error');
-		#$this->registerArgument('value', 'string', 'Value of input tag. Required for checkboxes', TRUE);
+		$this->overrideArgument('value', 'string', 'Value of input tag. Required for checkboxes', TRUE);
 		$this->registerUniversalTagAttributes();
 	}
 
@@ -115,33 +112,6 @@ class Tx_Fluid_ViewHelpers_Form_CheckboxViewHelper extends Tx_Fluid_ViewHelpers_
 		$hiddenField = $this->renderHiddenFieldForEmptyValue();
 		return $hiddenField . $this->tag->render();
 	}
-
-	/**
-	 * Renders a hidden field with the same name as the element, to make sure the empty value is submitted
-	 * in case the checkbox is not selected.
-	 *
-	 * @return string the hidden field.
-	 */
-	protected function renderHiddenFieldForEmptyValue() {
-		if ($this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_Form_CheckboxViewHelper', 'checkboxFieldNames')) {
-			$checkboxFieldNames = $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_Form_CheckboxViewHelper', 'checkboxFieldNames');
-		} else {
-			$checkboxFieldNames = array();
-		}
-
-		$nameOfElement = $this->getName();
-		if (!in_array($nameOfElement, $checkboxFieldNames)) {
-			$checkboxFieldNames[] = $nameOfElement;
-			$this->viewHelperVariableContainer->addOrUpdate('Tx_Fluid_ViewHelpers_Form_CheckboxViewHelper', 'checkboxFieldNames', $checkboxFieldNames);
-
-			$tagBuilder = t3lib_div::makeInstance('Tx_Fluid_Core_ViewHelper_TagBuilder', 'input');
-			$tagBuilder->addAttribute('type', 'hidden');
-			$tagBuilder->addAttribute('name', $nameOfElement);
-			$tagBuilder->addAttribute('value', '');
-			return $tagBuilder->render();
-		}
-		return '';
-	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php
index 05bf09363c8d13c3baee47be923414c7c63ae438..91f5c9432be4b6d7447c7ec241e9b445d884abeb 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/ErrorsViewHelper.php
@@ -38,9 +38,6 @@
  *   <li>1234567890: Validation errors for argument "newBlog"</li>
  * </ul>
  *
- * @version $Id: ErrorsViewHelper.php 2074 2010-03-19 12:12:15Z sebastian $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
index 4b07a11824d10ac88dd693b2841b1feb21e4c027..08f69a65db804208f41d01576359146fb3200561 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/HiddenViewHelper.php
@@ -35,9 +35,6 @@
  * You can also use the "property" attribute if you have bound an object to the form.
  * See <f:form> for more documentation.
  *
- * @version $Id: HiddenViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -81,4 +78,4 @@ class Tx_Fluid_ViewHelpers_Form_HiddenViewHelper extends Tx_Fluid_ViewHelpers_Fo
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
index 53ebaa749274bf09f6f65b67dd1c776ff997c181..feddb5e1c5b9a8fb63fb116f939e8eb251d36a90 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/PasswordViewHelper.php
@@ -32,9 +32,6 @@
  * Output:
  * <input type="password" name="myPassword" value="default value" />
  *
- * @version $Id: PasswordViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
index c9afe6ecf80204a546d2619d2c505e128e73e3f0..93b1a0dca0cd9003ba8529320789008cc8063b08 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php
@@ -50,9 +50,6 @@
  * <input type="radio" name="user[newsletter]" value="0" /> no
  * (depending on property "newsletter")
  *
- * @version $Id: RadioViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -75,7 +72,7 @@ class Tx_Fluid_ViewHelpers_Form_RadioViewHelper extends Tx_Fluid_ViewHelpers_For
 		parent::initializeArguments();
 		$this->registerTagAttribute('disabled', 'string', 'Specifies that the input element should be disabled when the page loads');
 		$this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this view helper', FALSE, 'f3-form-error');
-		#$this->registerArgument('value', 'string', 'Value of input tag. Required for radio buttons', TRUE);
+		$this->overrideArgument('value', 'string', 'Value of input tag. Required for radio buttons', TRUE);
 		$this->registerUniversalTagAttributes();
 	}
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
index 0cef520d0c8034963b4fd4b7b10e1d865809cd55..9f0142fdea75c5eacbd5c052e04025df4676b95c 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
@@ -60,9 +60,6 @@
  *
  * The "value" property now expects a domain object, and tests for object equivalence.
  *
- * @version $Id: SelectViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -96,6 +93,7 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelper extends Tx_Fluid_ViewHelpers_Fo
 		$this->registerArgument('optionValueField', 'string', 'If specified, will call the appropriate getter on each object to determine the value.');
 		$this->registerArgument('optionLabelField', 'string', 'If specified, will call the appropriate getter on each object to determine the label.');
 		$this->registerArgument('sortByOptionLabel', 'boolean', 'If true, List will be sorted by label.', FALSE, FALSE);
+		$this->registerArgument('selectAllByDefault', 'boolean', 'If specified options are selected if none was set before.', FALSE, FALSE);
 		$this->registerArgument('errorClass', 'string', 'CSS class to set if there are errors for this view helper', FALSE, 'f3-form-error');
 	}
 
@@ -123,10 +121,13 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelper extends Tx_Fluid_ViewHelpers_Fo
 
 		$this->setErrorClassAttribute();
 
+		$content = '';
+
 		// register field name for token generation.
 		// in case it is a multi-select, we need to register the field name
 		// as often as there are elements in the box
-		if ($this->arguments->hasArgument('multiple')) {
+		if ($this->arguments->hasArgument('multiple') && $this->arguments['multiple'] !== '') {
+			$content .= $this->renderHiddenFieldForEmptyValue();
 			for ($i=0; $i<count($options); $i++) {
 				$this->registerFieldNameForFormTokenGeneration($name);
 			}
@@ -134,7 +135,8 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelper extends Tx_Fluid_ViewHelpers_Fo
 			$this->registerFieldNameForFormTokenGeneration($name);
 		}
 
-		return $this->tag->render();
+		$content .= $this->tag->render();
+		return $content;
 	}
 
 	/**
@@ -212,16 +214,21 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelper extends Tx_Fluid_ViewHelpers_Fo
 	/**
 	 * Render the option tags.
 	 *
-	 * @return boolean true if the
+	 * @return boolean TRUE if the value should be marked a s selected; FALSE otherwise
 	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Jochen Rau <jochen.rau@typoplanet.de>
 	 */
 	protected function isSelected($value) {
 		$selectedValue = $this->getSelectedValue();
 		if ($value === $selectedValue || (string)$value === $selectedValue) {
 			return TRUE;
 		}
-		if ($this->arguments->hasArgument('multiple') && is_array($selectedValue) && in_array($value, $selectedValue)) {
-			return TRUE;
+		if ($this->arguments->hasArgument('multiple')) {
+			if (is_null($selectedValue) && $this->arguments['selectAllByDefault'] === TRUE) {
+				return TRUE;
+			} elseif (is_array($selectedValue) && in_array($value, $selectedValue)) {
+				return TRUE;
+			}
 		}
 		return FALSE;
 	}
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
index c188db957b65e0c589b428bfbd9fea796cee4b9f..5aded870c7ac925a1eee7828ee31eac3471cddc7 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SubmitViewHelper.php
@@ -39,9 +39,6 @@
   * Output:
  * <input type="submit" name="mySubmit" value="Send Mail" />
  *
- * @version $Id: SubmitViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
index 998445efb03b2d8ef181f0a61d076c09d279b562..0d992dd963329cf71c8bbc2b95f4032ed57507fe 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextareaViewHelper.php
@@ -33,9 +33,6 @@
  * Output:
  * <textarea name="myTextArea">This is shown inside the textarea</textarea>
  *
- * @version $Id: TextareaViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php
index 8e673c05fc0c3a334fe58b2f29ea41bdae92f987..1ba0e18d31765de3e7e87968ff2392e2b9fac5c3 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextboxViewHelper.php
@@ -34,9 +34,6 @@
  * Output:
  * <input type="text" name="myTextBox" value="default value" />
  *
- * @version $Id: TextboxViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php
index 10b4c08b51fe8433a83cf58a70a7456ffa313264..78a87d0634dab87ca341e2e3b043736e5da6d455 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/TextfieldViewHelper.php
@@ -32,9 +32,6 @@
  * Output:
  * <input type="text" name="myTextBox" value="default value" />
  *
- * @version $Id: TextfieldViewHelper.php 3628 2010-01-14 15:31:38Z robert $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
index 58ce48d97bd7eaed0830eba1db4301ee6c2dd81f..11bf8e568d11d3d9581ff7155db5ca6cff0edc8b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php
@@ -33,9 +33,6 @@
  * Output:
  * <input type="file" name="file" />
  *
- * @version $Id: UploadViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Form
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -82,4 +79,4 @@ class Tx_Fluid_ViewHelpers_Form_UploadViewHelper extends Tx_Fluid_ViewHelpers_Fo
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
index 63f5ece62fb1aa93fa9aa3d05abac4def109f042..7e20aacb3c9e373b98556e7a6724660a1f48a017 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
@@ -21,9 +21,6 @@
  *                                                                        */
 
 /**
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: FormViewHelper.php 2049 2010-03-16 10:51:45Z sebastian $
  */
 
 /**
@@ -53,9 +50,6 @@
  * </code>
  * This automatically inserts the value of {customer.name} inside the textbox and adjusts the name of the textbox accordingly.
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: FormViewHelper.php 2049 2010-03-16 10:51:45Z sebastian $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  * @scope prototype
  */
@@ -116,11 +110,20 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 	 * @param integer $pageUid Target page uid
 	 * @param mixed $object Object to use for the form. Use in conjunction with the "property" attribute on the sub tags
 	 * @param integer $pageType Target page type
+	 * @param boolean $noCache set this to disable caching for the target page. You should not need this.
+	 * @param boolean $noCacheHash set this to supress the cHash query parameter created by TypoLink. You should not need this.
+	 * @param string $section The anchor to be added to the action URI (only active if $actionUri is not set)
+	 * @param string $format The requested format (e.g. ".html") of the target page (only active if $actionUri is not set)
+	 * @param array $additionalParams additional action URI query parameters that won't be prefixed like $arguments (overrule $arguments) (only active if $actionUri is not set)
+	 * @param boolean $absolute If set, an absolute action URI is rendered (only active if $actionUri is not set)
+	 * @param boolean $addQueryString If set, the current query parameters will be kept in the action URI (only active if $actionUri is not set)
+	 * @param array $argumentsToBeExcludedFromQueryString arguments to be removed from the action URI. Only active if $addQueryString = TRUE and $actionUri is not set
 	 * @param string $fieldNamePrefix Prefix that will be added to all field names within this form. If not set the prefix will be tx_yourExtension_plugin
 	 * @param string $actionUri can be used to overwrite the "action" attribute of the form tag
+	 * @param string $objectName name of the object that is bound to this form. If this argument is not specified, the name attribute of this form is used to determine the FormObjectName
 	 * @return string rendered form
 	 */
-	public function render($action = NULL, array $arguments = array(), $controller = NULL, $extensionName = NULL, $pluginName = NULL, $pageUid = NULL, $object = NULL, $pageType = 0, $fieldNamePrefix = NULL, $actionUri = NULL) {
+	public function render($action = NULL, array $arguments = array(), $controller = NULL, $extensionName = NULL, $pluginName = NULL, $pageUid = NULL, $object = NULL, $pageType = 0, $noCache = FALSE, $noCacheHash = FALSE, $section = '', $format = '', array $additionalParams = array(), $absolute = FALSE, $addQueryString = FALSE, array $argumentsToBeExcludedFromQueryString = array(), $fieldNamePrefix = NULL, $actionUri = NULL, $objectName = NULL) {
 		$this->setFormActionUri();
 
 		if (strtolower($this->arguments['method']) === 'get') {
@@ -129,24 +132,26 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 			$this->tag->addAttribute('method', 'post');
 		}
 
-		$this->addFormNameToViewHelperVariableContainer();
+		$this->addFormObjectNameToViewHelperVariableContainer();
 		$this->addFormObjectToViewHelperVariableContainer();
 		$this->addFieldNamePrefixToViewHelperVariableContainer();
 		$this->addFormFieldNamesToViewHelperVariableContainer();
 
 		$formContent = $this->renderChildren();
 
-		$content = $this->renderHiddenIdentityField($this->arguments['object'], $this->arguments['name']);
+		$content = chr(10) . '<div style="display: none">';
+		$content .= $this->renderHiddenIdentityField($this->arguments['object'], $this->arguments['name']);
 		$content .= $this->renderAdditionalIdentityFields();
 		$content .= $this->renderHiddenReferrerFields();
 		$content .= $this->renderRequestHashField(); // Render hmac after everything else has been rendered
+		$content .= chr(10) . '</div>' . chr(10);
 		$content .= $formContent;
 
 		$this->tag->setContent($content);
 
 		$this->removeFieldNamePrefixFromViewHelperVariableContainer();
 		$this->removeFormObjectFromViewHelperVariableContainer();
-		$this->removeFormNameFromViewHelperVariableContainer();
+		$this->removeFormObjectNameFromViewHelperVariableContainer();
 		$this->removeFormFieldNamesFromViewHelperVariableContainer();
 		$this->removeCheckboxFieldNamesFromViewHelperVariableContainer();
 
@@ -167,6 +172,14 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 				->reset()
 				->setTargetPageUid($this->arguments['pageUid'])
 				->setTargetPageType($this->arguments['pageType'])
+				->setNoCache($this->arguments['noCache'])
+				->setUseCacheHash(!$this->arguments['noCacheHash'])
+				->setSection($this->arguments['section'])
+				->setCreateAbsoluteUri($this->arguments['absolute'])
+				->setArguments((array)$this->arguments['additionalParams'])
+				->setAddQueryString($this->arguments['addQueryString'])
+				->setArgumentsToBeExcludedFromQueryString((array)$this->arguments['argumentsToBeExcludedFromQueryString'])
+				->setFormat($this->arguments['format'])
 				->uriFor($this->arguments['action'], $this->arguments['arguments'], $this->arguments['controller'], $this->arguments['extensionName'], $this->arguments['pluginName']);
 			$this->formActionUriArguments = $uriBuilder->getArguments();
 		}
@@ -213,13 +226,14 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 	}
 
 	/**
-	 * Adds the form name to the ViewHelperVariableContainer if the name attribute is specified.
+	 * Adds the form object name to the ViewHelperVariableContainer if "objectName" argument or "name" attribute is specified.
 	 *
 	 * @return void
 	 */
-	protected function addFormNameToViewHelperVariableContainer() {
-		if ($this->arguments->hasArgument('name')) {
-			$this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName', $this->arguments['name']);
+	protected function addFormObjectNameToViewHelperVariableContainer() {
+		$formObjectName = $this->getFormObjectName();
+		if ($formObjectName !== NULL) {
+			$this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName', $formObjectName);
 		}
 	}
 
@@ -228,12 +242,30 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 	 *
 	 * @return void
 	 */
-	protected function removeFormNameFromViewHelperVariableContainer() {
-		if ($this->arguments->hasArgument('name')) {
-			$this->viewHelperVariableContainer->remove('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName');
+	protected function removeFormObjectNameFromViewHelperVariableContainer() {
+		$formObjectName = $this->getFormObjectName();
+		if ($formObjectName !== NULL) {
+			$this->viewHelperVariableContainer->remove('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
 		}
 	}
 
+	/**
+	 * Returns the name of the object that is bound to this form.
+	 * If the "objectName" argument has been specified, this is returned. Otherwise the name attribute of this form.
+	 * If neither objectName nor name arguments have been set, NULL is returned.
+	 *
+	 * @return string specified Form name or NULL if neither $objectName nor $name arguments have been specified
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function getFormObjectName() {
+		$formObjectName = NULL;
+		if ($this->arguments->hasArgument('objectName')) {
+			$formObjectName = $this->arguments['objectName'];
+		} elseif ($this->arguments->hasArgument('name')) {
+			$formObjectName = $this->arguments['name'];
+		}
+		return $formObjectName;
+	}
 	/**
 	 * Adds the object that is bound to this form to the ViewHelperVariableContainer if the formObject attribute is specified.
 	 *
@@ -359,7 +391,7 @@ class Tx_Fluid_ViewHelpers_FormViewHelper extends Tx_Fluid_ViewHelpers_Form_Abst
 
 		return 'tx_' . strtolower($extensionName) . '_' . strtolower($pluginName);
 	}
-
+	
 	/**
 	 * Remove Checkbox field names from ViewHelper variable container, to start from scratch when a new form starts.
 	 */
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
index bfe873f9736df7eb4e9cb6ad50de9a06ded098bc..5ea0cc846a6cebfccf504ca83708945cde0508f1 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: CropViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
 
 /**
@@ -45,11 +42,13 @@
  * Output:
  * This is so...
  *
- * WARNING: This tag doesn't care about multibyte charsets currently.
+ * <code title="Don't respect HTML tags">
+ * <f:format.crop maxCharacters="28" respectWordBoundaries="false" respectHtml="false">This is some text with <strong>HTML</strong> tags</f:format.crop>
+ * </code>
+ *
+ * Output:
+ * This is some text with <stro
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: CropViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  * @scope prototype
  */
@@ -60,6 +59,11 @@ class Tx_Fluid_ViewHelpers_Format_CropViewHelper extends Tx_Fluid_Core_ViewHelpe
 	 */
 	protected $contentObject;
 
+	/**
+	 * @var	t3lib_fe contains a backup of the current $GLOBALS['TSFE'] if used in BE mode
+	 */
+	protected $tsfeBackup;
+
 	/**
 	 * Constructor. Used to create an instance of tslib_cObj used by the render() method.
 	 *
@@ -75,29 +79,73 @@ class Tx_Fluid_ViewHelpers_Format_CropViewHelper extends Tx_Fluid_Core_ViewHelpe
 	 *
 	 * @param integer $maxCharacters Place where to truncate the string
 	 * @param string $append What to append, if truncation happened
-	 * @param boolean $respectBoundaries If TRUE and division is in the middle of a word, the remains of that word is removed. This is currently ignored in backend mode!
+	 * @param boolean $respectBoundaries If TRUE and division is in the middle of a word, the remains of that word is removed.
+	 * @param boolean $respectHtml If TRUE the cropped string will respect HTML tags and entities. Technically that means, that cropHTML() is called rather than crop()
 	 * @return string cropped text
 	 * @author Andreas Pattynama <andreas.pattynama@innocube.ch>
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 * @author Felix Oertel <oertel@networkteam.com>
 	 */
-	public function render($maxCharacters, $append = '...', $respectWordBoundaries = TRUE) {
+	public function render($maxCharacters, $append = '...', $respectWordBoundaries = TRUE, $respectHtml = TRUE) {
 		$stringToTruncate = $this->renderChildren();
 		if (TYPO3_MODE === 'BE') {
-			if (strlen($stringToTruncate) > $maxCharacters) {
-				$stringToTruncate = substr($stringToTruncate, 0, ($maxCharacters - strlen($append))) . $append;
-			}
-			return $stringToTruncate;
+			$this->simulateFrontendEnvironment();
+		}
+
+		if ($respectHtml) {
+			$content = $this->contentObject->cropHTML($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries);
 		} else {
-			if (strip_tags($stringToTruncate) != $stringToTruncate) {
-				return $this->contentObject->cropHTML($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries);
+			$content = $this->contentObject->crop($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries);
+		}
+
+		if (TYPO3_MODE === 'BE') {
+			$this->resetFrontendEnvironment();
+		}
+		return $content;
+	}
+
+	/**
+	 * Sets the global variables $GLOBALS['TSFE']->csConvObj and $GLOBALS['TSFE']->renderCharset in Backend mode
+	 * This somewhat hacky work around is currently needed because the crop() and cropHTML() functions of tslib_cObj rely on those variables to be set
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function simulateFrontendEnvironment() {
+		$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
+		$GLOBALS['TSFE'] = new stdClass();
+
+			// preparing csConvObj
+		if (!is_object($GLOBALS['TSFE']->csConvObj)) {
+			if (is_object($GLOBALS['LANG'])) {
+				$GLOBALS['TSFE']->csConvObj = $GLOBALS['LANG']->csConvObj;
+			} else {
+				$GLOBALS['TSFE']->csConvObj = t3lib_div::makeInstance('t3lib_cs');
+			}
+		}
+
+			// preparing renderCharset
+		if (!is_object($GLOBALS['TSFE']->renderCharset)) {
+			if (is_object($GLOBALS['LANG'])) {
+				$GLOBALS['TSFE']->renderCharset = $GLOBALS['LANG']->charSet;
 			} else {
-				return $this->contentObject->crop($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries);
+				$GLOBALS['TSFE']->renderCharset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];
 			}
 		}
 	}
+
+	/**
+	 * Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @see simulateFrontendEnvironment()
+	 */
+	protected function resetFrontendEnvironment() {
+		$GLOBALS['TSFE'] = $this->tsfeBackup;
+	}
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php
index d57e1ea8ca07b8b11122b77ec0e0d8ec64abba2e..be9c6cbca9176e162d9cd1f891f06132e41336b3 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php
@@ -39,9 +39,6 @@
  * Output:
  * 54,321.00 $
  *
- * @version $Id: CurrencyViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
index 647ccb839b99a52d62885566d3bb015786259f12..25f4df9ee1018b414dd0f4ee35cfc84551c2778f 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
@@ -57,9 +57,6 @@
  * 1980-12-13
  * (depending on the current date)
  *
- * @version $Id: DateViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
index 4cf5dab748e52d55339932e259accc860671c39c..192092f0b7dbf50f3cb8b41a83eb2f1d9e336efb 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: HtmlViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
  */
 
 /**
@@ -41,9 +38,6 @@
  *
  * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4198758
  *
- * @package
- * @subpackage
- * @version $Id: HtmlViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
  */
 class Tx_Fluid_ViewHelpers_Format_HtmlViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
@@ -52,6 +46,11 @@ class Tx_Fluid_ViewHelpers_Format_HtmlViewHelper extends Tx_Fluid_Core_ViewHelpe
 	 */
 	protected $contentObject;
 
+	/**
+	 * @var	t3lib_fe contains a backup of the current $GLOBALS['TSFE'] if used in BE mode
+	 */
+	protected $tsfeBackup;
+
 	/**
 	 * If the escaping interceptor should be disabled inside this ViewHelper, then set this value to FALSE.
 	 * This is internal and NO part of the API. It is very likely to change.
@@ -77,8 +76,42 @@ class Tx_Fluid_ViewHelpers_Format_HtmlViewHelper extends Tx_Fluid_Core_ViewHelpe
 	 * @author Niels Pardon <mail@niels-pardon.de>
 	 */
 	public function render($parseFuncTSPath = 'lib.parseFunc_RTE') {
+		if (TYPO3_MODE === 'BE') {
+			$this->simulateFrontendEnvironment();
+		}
+
 		$value = $this->renderChildren();
-		return $this->contentObject->parseFunc($value, array(), '< ' . $parseFuncTSPath);
+		$content = $this->contentObject->parseFunc($value, array(), '< ' . $parseFuncTSPath);
+
+		if (TYPO3_MODE === 'BE') {
+			$this->resetFrontendEnvironment();
+		}
+		return $content;
+	}
+
+	/**
+	 * Copies the specified parseFunc configuration to $GLOBALS['TSFE']->tmpl->setup in Backend mode
+	 * This somewhat hacky work around is currently needed because the parseFunc() function of tslib_cObj relies on those variables to be set
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function simulateFrontendEnvironment() {
+		$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
+		$configurationManager = Tx_Extbase_Dispatcher::getConfigurationManager();
+		$GLOBALS['TSFE'] = new stdClass();
+		$GLOBALS['TSFE']->tmpl->setup = $configurationManager->loadTypoScriptSetup();
+	}
+
+	/**
+	 * Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @see simulateFrontendEnvironment()
+	 */
+	protected function resetFrontendEnvironment() {
+		$GLOBALS['TSFE'] = $this->tsfeBackup;
 	}
 }
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
index f289a0a496b87ac3a5445ebcc7c00f5a47630c11..bf465db320066332d5a6f21af5312b77f8f62009 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/Nl2brViewHelper.php
@@ -33,9 +33,6 @@
  * Output:
  * text with line breaks replaced by <br />
  *
- * @version $Id: Nl2brViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php
index 74e7971b72e4bc74788a81a5fbcc4fa4dd06079a..1cf4a5ea22b9944d878c59f0ea12a59ad10be28a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php
@@ -40,9 +40,6 @@
  * Output:
  * 423.423,2
  *
- * @version $Id: NumberViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
index 563f8f5023769fd86b81c335a53ce33d95e36976..3f8d3074b6f75b9352fdc805a6a6200782841ec8 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php
@@ -40,9 +40,6 @@
  * Output:
  * TYPO3-=-=-
  *
- * @version $Id: PaddingViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php
index 7fbc00c249fa55ba3d4d36cea3d31d2900a8c0dc..48ffdf80d00b394d6e39ea18c3ffe6f940fb9cd4 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/PrintfViewHelper.php
@@ -48,9 +48,6 @@
  * Output:
  * We love TYPO3
  *
- * @version $Id: PrintfViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers\Format
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php
index 5677ec9b151fa4e482c0edf135435cb75680a018..52d8e0ea8eb7e7d5b5d6996fd6aaddbe332a9b87 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/GroupedForViewHelper.php
@@ -74,9 +74,6 @@
  *   </li>
  * </ul>
  *
- * @version $Id: GroupedForViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -86,7 +83,7 @@ class Tx_Fluid_ViewHelpers_GroupedForViewHelper extends Tx_Fluid_Core_ViewHelper
 	/**
 	 * Iterates through elements of $each and renders child nodes
 	 *
-	 * @param array $each The array or SplObjectStorage to iterated over
+	 * @param array $each The array or Tx_Extbase_Persistence_ObjectStorage to iterated over
 	 * @param string $as The name of the iteration variable
 	 * @param string $groupBy Group by this property
 	 * @param string $groupKey The name of the variable to store the current group
@@ -103,21 +100,13 @@ class Tx_Fluid_ViewHelpers_GroupedForViewHelper extends Tx_Fluid_Core_ViewHelper
 			if (!$each instanceof Traversable) {
 				throw new Tx_Fluid_Core_ViewHelper_Exception('GroupedForViewHelper only supports arrays and objects implementing Traversable interface' , 1253108907);
 			}
-			$each = $this->convertToArray($each);
+			$each = iterator_to_array($each);
 		}
-		$groups = array();
-		foreach ($each as $keyValue => $singleElement) {
-			if (is_array($singleElement)) {
-				$currentGroupKey = isset($singleElement[$groupBy]) ? $singleElement[$groupBy] : NULL;
-			} elseif (is_object($singleElement)) {
-				$currentGroupKey = Tx_Extbase_Reflection_ObjectAccess::getProperty($singleElement, $groupBy);
-			} else {
-				throw new Tx_Fluid_Core_ViewHelper_Exception('GroupedForViewHelper only supports multi-dimensional arrays and objects' , 1253120365);
-			}
-			$groups[$currentGroupKey][$keyValue] = $singleElement;
-		}
-		foreach ($groups as $currentGroupKey => $group) {
-			$this->templateVariableContainer->add($groupKey, $currentGroupKey);
+
+		$groups = $this->groupElements($each, $groupBy);
+
+		foreach ($groups['values'] as $currentGroupIndex => $group) {
+			$this->templateVariableContainer->add($groupKey, $groups['keys'][$currentGroupIndex]);
 			$this->templateVariableContainer->add($as, $group);
 			$output .= $this->renderChildren();
 			$this->templateVariableContainer->remove($groupKey);
@@ -127,20 +116,32 @@ class Tx_Fluid_ViewHelpers_GroupedForViewHelper extends Tx_Fluid_Core_ViewHelper
 	}
 
 	/**
-	 * Turns the given object into an array.
-	 * The object has to implement the Traversable interface
+	 * Groups the given array by the specified groupBy property.
 	 *
-	 * @param Traversable $object The object to be turned into an array. If the object implements Iterator the key will be preserved.
-	 * @return array The resulting array
+	 * @param array $elements The array / traversable object to be grouped
+	 * @param string $groupBy Group by this property
+	 * @return array The grouped array in the form array('keys' => array('key1' => [key1value], 'key2' => [key2value], ...), 'values' => array('key1' => array([key1value] => [element1]), ...), ...)
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	protected function convertToArray(Traversable $object) {
-		$array = array();
-		foreach ($object as $keyValue => $singleElement) {
-			$array[$keyValue] = $singleElement;
+	protected function groupElements(array $elements, $groupBy) {
+		$groups = array('keys' => array(), 'values' => array());
+		foreach ($elements as $key => $value) {
+			if (is_array($value)) {
+				$currentGroupIndex = isset($value[$groupBy]) ? $value[$groupBy] : NULL;
+			} elseif (is_object($value)) {
+				$currentGroupIndex = Tx_Extbase_Reflection_ObjectAccess::getProperty($value, $groupBy);
+			} else {
+				throw new Tx_Fluid_Core_ViewHelper_Exception('GroupedForViewHelper only supports multi-dimensional arrays and objects' , 1253120365);
+			}
+			$currentGroupKeyValue = $currentGroupIndex;
+			if (is_object($currentGroupIndex)) {
+				$currentGroupIndex = spl_object_hash($currentGroupIndex);
+			}
+			$groups['keys'][$currentGroupIndex] = $currentGroupKeyValue;
+			$groups['values'][$currentGroupIndex][$key] = $value;
 		}
-		return $array;
+		return $groups;
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php
index 53a51eb2d0921349bff01081971c3cb8bf37832d..797b066065cf6da2db2fd38b0b143cf5111ed5e9 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/IfViewHelper.php
@@ -84,112 +84,27 @@
  * Otherwise, everything the value of the "else"-attribute is displayed.
  *
  *
- * @version $Id: IfViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
  */
-class Tx_Fluid_ViewHelpers_IfViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
-
-	/**
-	 * An array of Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode
-	 * @var array
-	 */
-	protected $childNodes = array();
-
-	/**
-	 * @var Tx_Fluid_Core_Rendering_RenderingContext
-	 */
-	protected $renderingContext;
-
-	/**
-	 * Setter for ChildNodes - as defined in ChildNodeAccessInterface
-	 *
-	 * @param array $childNodes Child nodes of this syntax tree node
-	 * @return void
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @api
-	 */
-	public function setChildNodes(array $childNodes) {
-		$this->childNodes = $childNodes;
-	}
-
-	/**
-	 * Sets the rendering context which needs to be passed on to child nodes
-	 *
-	 * @param Tx_Fluid_Core_Rendering_RenderingContext $renderingContext the renderingcontext to use
-	 */
-	public function setRenderingContext(Tx_Fluid_Core_Rendering_RenderingContext $renderingContext) {
-		$this->renderingContext = $renderingContext;
-	}
+class Tx_Fluid_ViewHelpers_IfViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper {
 
 	/**
 	 * renders <f:then> child if $condition is true, otherwise renders <f:else> child.
 	 *
 	 * @param boolean $condition View helper condition
-	 * @param string $then String to be returned if the condition is met
-	 * @param string $else String to be returned if the condition is not met
 	 * @return string the rendered string
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 * @api
 	 */
-	public function render($condition, $then = NULL, $else = NULL) {
+	public function render($condition) {
 		if ($condition) {
 			return $this->renderThenChild();
 		} else {
 			return $this->renderElseChild();
 		}
 	}
-
-	/**
-	 * Returns value of "then" attribute.
-	 * If then attribute is not set, iterates through child nodes and renders ThenViewHelper.
-	 * If then attribute is not set and no ThenViewHelper is found, all child nodes are rendered
-	 *
-	 * @return string rendered ThenViewHelper or contents of <f:if> if no ThenViewHelper was found
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	protected function renderThenChild() {
-		if ($this->arguments->hasArgument('then')) {
-			return $this->arguments['then'];
-		}
-		foreach ($this->childNodes as $childNode) {
-			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-				&& $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ThenViewHelper') {
-				$childNode->setRenderingContext($this->renderingContext);
-				$data = $childNode->evaluate();
-				return $data;
-			}
-		}
-		return $this->renderChildren();
-	}
-
-	/**
-	 * Returns value of "else" attribute.
-	 * If else attribute is not set, iterates through child nodes and renders ElseViewHelper.
-	 * If else attribute is not set and no ElseViewHelper is found, an empty string will be returned.
-	 *
-	 * @return string rendered ElseViewHelper or an empty string if no ThenViewHelper was found
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	protected function renderElseChild() {
-		foreach ($this->childNodes as $childNode) {
-			if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode
-				&& $childNode->getViewHelperClassName() === 'Tx_Fluid_ViewHelpers_ElseViewHelper') {
-				$childNode->setRenderingContext($this->renderingContext);
-				return $childNode->evaluate();
-			}
-		}
-		if ($this->arguments->hasArgument('else')) {
-			return $this->arguments['else'];
-		}
-		return '';
-	}
 }
-
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
index 987cfc084453e2bb6eed9d968e0590e6f9fb9a71..5ec71ce81941af25e9ac19960cd28592a15bf876 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php
@@ -17,18 +17,12 @@
  *
  * @todo documentation
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: ImageViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
 
 /**
  *
- * @package
- * @subpackage
- * @version $Id: ImageViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
-class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var	tslib_cObj
@@ -40,6 +34,16 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 	 */
 	protected $tagName = 'img';
 
+	/**
+	 * @var	t3lib_fe contains a backup of the current $GLOBALS['TSFE'] if used in BE mode
+	 */
+	protected $tsfeBackup;
+
+	/**
+	 * @var	string
+	 */
+	protected $workingDirectoryBackup;
+
 	/**
 	 * Constructor. Used to create an instance of tslib_cObj used by the render() method.
 	 *
@@ -48,9 +52,6 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 	 */
 	public function __construct($contentObject = NULL) {
 		$this->contentObject = $contentObject !== NULL ? $contentObject : t3lib_div::makeInstance('tslib_cObj');
-		if (TYPO3_MODE === 'BE') {
-			throw new Tx_Fluid_Core_ViewHelper_Exception('ImageViewHelper does not (yet) work in backend mode' , 1253191784);
-		}
 	}
 
 	/**
@@ -85,6 +86,9 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
 	public function render($src, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL) {
+		if (TYPO3_MODE === 'BE') {
+			$this->simulateFrontendEnvironment();
+		}
 		$setup = array(
 			'width' => $width,
 			'height' => $height,
@@ -93,6 +97,9 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 			'maxW' => $maxWidth,
 			'maxH' => $maxHeight
 		);
+		if (TYPO3_MODE === 'BE' && substr($src, 0, 3) === '../') {
+			$src = substr($src, 3);
+		}
 		$imageInfo = $this->contentObject->getImgResource($src, $setup);
 		$GLOBALS['TSFE']->lastImageInfo = $imageInfo;
 		if (!is_array($imageInfo)) {
@@ -102,6 +109,10 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 		$GLOBALS['TSFE']->imagesOnPage[] = $imageInfo[3];
 
 		$imageSource = $GLOBALS['TSFE']->absRefPrefix . t3lib_div::rawUrlEncodeFP($imageInfo[3]);
+		if (TYPO3_MODE === 'BE') {
+			$imageSource = '../' . $imageSource;
+			$this->resetFrontendEnvironment();
+		}
 		$this->tag->addAttribute('src', $imageSource);
 		$this->tag->addAttribute('width', $imageInfo[0]);
 		$this->tag->addAttribute('height', $imageInfo[1]);
@@ -111,4 +122,41 @@ class Tx_Fluid_ViewHelpers_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_TagB
 
 		return $this->tag->render();
 	}
+
+	/**
+	 * Prepares $GLOBALS['TSFE'] for Backend mode
+	 * This somewhat hacky work around is currently needed because the getImgResource() function of tslib_cObj relies on those variables to be set
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	protected function simulateFrontendEnvironment() {
+		$this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
+			// set the working directory to the site root
+		$this->workingDirectoryBackup = getcwd();
+		chdir(PATH_site);
+
+		$configurationManager = Tx_Extbase_Dispatcher::getConfigurationManager();
+		$typoScriptSetup = $configurationManager->loadTypoScriptSetup();
+		$GLOBALS['TSFE'] = new stdClass();
+		$template = t3lib_div::makeInstance('t3lib_TStemplate');
+		$template->tt_track = 0;
+		$template->init();
+		$template->getFileName_backPath = PATH_site;
+		$GLOBALS['TSFE']->tmpl = $template;
+		$GLOBALS['TSFE']->tmpl->setup = $typoScriptSetup;
+		$GLOBALS['TSFE']->config = $typoScriptSetup;
+	}
+
+	/**
+	 * Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()
+	 *
+	 * @return void
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @see simulateFrontendEnvironment()
+	 */
+	protected function resetFrontendEnvironment() {
+		$GLOBALS['TSFE'] = $this->tsfeBackup;
+		chdir($this->workingDirectoryBackup);
+	}
 }
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php
index 8f138bb98247910fb6db8726d35003a2a566ce6b..f467d271ea8570249c85ae9bb6a5ecb97ac0ba6c 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/LayoutViewHelper.php
@@ -23,12 +23,9 @@
 /**
  * With this tag, you can select a layout to be used..
  * <code><f:layout name="main" /></code>
+ * 
  *
  *
- *
- * @version $Id: LayoutViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -58,8 +55,7 @@ class Tx_Fluid_ViewHelpers_LayoutViewHelper extends Tx_Fluid_Core_ViewHelper_Abs
 	 */
 	static public function postParseEvent(Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode $syntaxTreeNode, array $viewHelperArguments, Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer) {
 		if (isset($viewHelperArguments['name'])) {
-			$viewHelperArguments['name']->setRenderingContext(new Tx_Fluid_Core_Rendering_RenderingContext());
-			$layoutName = $viewHelperArguments['name']->evaluate();
+			$layoutName = $viewHelperArguments['name']->getText();
 		} else {
 			$layoutName = 'default';
 		}
@@ -79,4 +75,4 @@ class Tx_Fluid_ViewHelpers_LayoutViewHelper extends Tx_Fluid_Core_ViewHelper_Abs
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
index b482373790ebc5afa071e35904e6ae73bfc571a5..bcd2c6f24b121e8862a26f037c5de396b72a268b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php
@@ -26,13 +26,10 @@
  * <a href="index.php?id=123&tx_myextension_plugin[action]=show&tx_myextension_plugin[controller]=Standard&cHash=xyz">action link</f:link.action>
  * (depending on the current page and your TS configuration)
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: ActionViewHelper.php 1492 2009-10-21 16:02:16Z bwaidelich $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
-class Tx_Fluid_ViewHelpers_Link_ActionViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_Link_ActionViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var string
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
index bc329d1e6e23fd7bbb8fafc39b7fbe2937b356cb..74d45962018741399f5f8312568b202a0858344d 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php
@@ -14,9 +14,6 @@
  *                                                                        */
 
 /**
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: EmailViewHelper.php 1492 2009-10-21 16:02:16Z bwaidelich $
  */
 
 /**
@@ -40,11 +37,8 @@
  * Output:
  * <a href="javascript:linkTo_UnCryptMailto('ocknvq,hqqBdct0vnf');">some custom content</a>
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: EmailViewHelper.php 1492 2009-10-21 16:02:16Z bwaidelich $
  */
-class Tx_Fluid_ViewHelpers_Link_EmailViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_Link_EmailViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var	string
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
index 411b8fae3ab0057a0152e54f338a061a813eb875..e981d7947a94b5a9fa3876f17f1bd93af9279902 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php
@@ -1,16 +1,23 @@
 <?php
 
 /*                                                                        *
- * This script is part of the TYPO3 project - inspiring people to share!  *
+ * This script belongs to the FLOW3 package "Fluid".                      *
  *                                                                        *
- * TYPO3 is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU General Public License version 2 as published by  *
- * the Free Software Foundation.                                          *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
  *                                                                        *
  * This script is distributed in the hope that it will be useful, but     *
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
- * Public License for more details.                                       *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
 /**
@@ -25,13 +32,11 @@
  * Output:
  * <a href="http://www.typo3.org" target="_blank">external link</a>
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: ExternalViewHelper.php 1492 2009-10-21 16:02:16Z bwaidelich $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
  * @scope prototype
  */
-class Tx_Fluid_ViewHelpers_Link_ExternalViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_Link_ExternalViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var string
@@ -39,10 +44,11 @@ class Tx_Fluid_ViewHelpers_Link_ExternalViewHelper extends Tx_Fluid_Core_ViewHel
 	protected $tagName = 'a';
 
 	/**
-	 * Arguments initialization
+	 * Initialize arguments
 	 *
 	 * @return void
-	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @api
 	 */
 	public function initializeArguments() {
 		$this->registerUniversalTagAttributes();
@@ -55,8 +61,8 @@ class Tx_Fluid_ViewHelpers_Link_ExternalViewHelper extends Tx_Fluid_Core_ViewHel
 	/**
 	 * @param string $uri the URI that will be put in the href attribute of the rendered link tag
 	 * @return string Rendered link
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
 	 */
 	public function render($uri) {
 		$this->tag->addAttribute('href', $uri);
@@ -67,4 +73,4 @@ class Tx_Fluid_ViewHelpers_Link_ExternalViewHelper extends Tx_Fluid_Core_ViewHel
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
index 1e9f9535398f3fce8a50854e21bc51dc6a32472f..f6c9ba3b3e99a13ec5a50b8c326cda9df45f38c9 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php
@@ -42,13 +42,10 @@
  * <a href="index.php?id=1&extension_key[foo]=bar">page link</f:link.action>
  * (depending on your TS configuration)
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: PageViewHelper.php 2050 2010-03-16 10:56:16Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
-class Tx_Fluid_ViewHelpers_Link_PageViewHelper extends Tx_Fluid_Core_ViewHelper_TagBasedViewHelper {
+class Tx_Fluid_ViewHelpers_Link_PageViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper {
 
 	/**
 	 * @var string
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php
index 91bbe966c358a76fe574cd9f79d36fa61cd505c3..85c2906332637cf072369773008ea51b94103a8a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/RenderFlashMessagesViewHelper.php
@@ -23,7 +23,6 @@
 /**
  * Deprecated. Use <f:flashMessages> instead!
  *
- * @version $Id: RenderFlashMessagesViewHelper.php 2043 2010-03-16 08:49:45Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -31,4 +30,4 @@ class Tx_Fluid_ViewHelpers_RenderFlashMessagesViewHelper extends Tx_Fluid_ViewHe
 
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php
index fd2c6e69f9d2911427e79e1bf2c0ff4e00a6bf45..9e049a812e519caeebcf8821d9c48b9acea02177 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/RenderViewHelper.php
@@ -22,9 +22,6 @@
 
 /**
  *
- * @version $Id: RenderViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -41,11 +38,11 @@ class Tx_Fluid_ViewHelpers_RenderViewHelper extends Tx_Fluid_Core_ViewHelper_Abs
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @api
 	 */
-	public function render($section = '', $partial = '', $arguments = array()) {
-		if ($partial !== '') {
-			return $this->viewHelperVariableContainer->getView()->renderPartial($partial, $section, $arguments, $this->viewHelperVariableContainer);
-		} elseif ($section !== '') {
-			return $this->viewHelperVariableContainer->getView()->renderSection($section);
+	public function render($section = NULL, $partial = NULL, $arguments = array()) {
+		if ($partial !== NULL) {
+			return $this->viewHelperVariableContainer->getView()->renderPartial($partial, $section, $arguments);
+		} elseif ($section !== NULL) {
+			return $this->viewHelperVariableContainer->getView()->renderSection($section, $arguments);
 		}
 		return '';
 	}
@@ -54,4 +51,4 @@ class Tx_Fluid_ViewHelpers_RenderViewHelper extends Tx_Fluid_Core_ViewHelper_Abs
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php
index 750c491b4598ebd915cd4a6c4c31b4635aad5c91..c3da242d23bd3b664757dea9775fe8a0c8f82e6a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/SectionViewHelper.php
@@ -23,9 +23,6 @@
 /**
  * A Section view helper
  *
- * @version $Id: SectionViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -54,9 +51,7 @@ class Tx_Fluid_ViewHelpers_SectionViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	static public function postParseEvent(Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode $syntaxTreeNode, array $viewHelperArguments, Tx_Fluid_Core_ViewHelper_TemplateVariableContainer $variableContainer) {
-		$viewHelperArguments['name']->setRenderingContext(new Tx_Fluid_Core_Rendering_RenderingContext());
-
-		$sectionName = $viewHelperArguments['name']->evaluate();
+		$sectionName = $viewHelperArguments['name']->getText();
 		if (!$variableContainer->exists('sections')) {
 			$variableContainer->add('sections', array());
 		}
@@ -74,8 +69,12 @@ class Tx_Fluid_ViewHelpers_SectionViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
 	 * @api
 	 */
 	public function render() {
-		return $this->renderChildren();
+		if ($this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_SectionViewHelper', 'isCurrentlyRenderingSection')) {
+			$this->viewHelperVariableContainer->remove('Tx_Fluid_ViewHelpers_SectionViewHelper', 'isCurrentlyRenderingSection');
+			return $this->renderChildren();
+		}
+		return '';
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php
index e58545c24d4fc57f7246f2b85725be629c1fca1e..5ace3e70d2666bbf390575e64e3203d9e3db362a 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/ThenViewHelper.php
@@ -24,9 +24,6 @@
  * "THEN" -> only has an effect inside of "IF". See If-ViewHelper for documentation.
  * @see Tx_Fluid_ViewHelpers_IfViewHelper
  *
- * @version $Id: ThenViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
- * @package Fluid
- * @subpackage ViewHelpers
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @api
  * @scope prototype
@@ -45,4 +42,4 @@ class Tx_Fluid_ViewHelpers_ThenViewHelper extends Tx_Fluid_Core_ViewHelper_Abstr
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
index 7e535a0076b9f068220c9a2beac8a2821fb30b97..d19ba3c90a7643b60253f1bfe774322873e1a67b 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
@@ -17,9 +17,6 @@
  * Translate a key from locallang. The files are loaded from the folder
  * "Resources/Private/Language/".
  *
- * @package TYPO3
- * @subpackage Fluid
- * @version $Id: TranslateViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  */
 class Tx_Fluid_ViewHelpers_TranslateViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
@@ -47,4 +44,4 @@ class Tx_Fluid_ViewHelpers_TranslateViewHelper extends Tx_Fluid_Core_ViewHelper_
 	}
 }
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
index e24bf88b5d3c00c7e0e0989d5f9ddd697cdfdae9..309b9395ec1fc798aab099c5ecfebac787951a5d 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php
@@ -26,15 +26,9 @@
  * index.php?id=123&tx_myextension_plugin[action]=show&tx_myextension_plugin[controller]=Standard&cHash=xyz
  * (depending on the current page and your TS configuration)
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: ActionViewHelper.php 1473 2009-10-20 03:39:21Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  *
- * @package
- * @subpackage
- * @version $Id: ActionViewHelper.php 1473 2009-10-20 03:39:21Z sebastian $
  */
 class Tx_Fluid_ViewHelpers_Uri_ActionViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
index b018a44decbd2c77aa5d08fdf21e193bc6bf0485..5132ec77b4febdd99bc9569b2efda8e32fd00df2 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
@@ -27,9 +27,6 @@
  * javascript:linkTo_UnCryptMailto('ocknvq,hqqBdct0vnf');
  * (depending on your spamProtectEmailAddresses-settings)
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: EmailViewHelper.php 1347 2009-09-23 15:33:06Z bwaidelich $
  */
 class Tx_Fluid_ViewHelpers_Uri_EmailViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
 
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php
index 74a9c404c141cd2c80f753b9d2c448006f85d74f..f460f2a22f1804d816421f14ac7ec45f7684e92d 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php
@@ -1,16 +1,23 @@
 <?php
 
 /*                                                                        *
- * This script is part of the TYPO3 project - inspiring people to share!  *
+ * This script belongs to the FLOW3 package "Fluid".                      *
  *                                                                        *
- * TYPO3 is free software; you can redistribute it and/or modify it under *
- * the terms of the GNU General Public License version 2 as published by  *
- * the Free Software Foundation.                                          *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
  *                                                                        *
  * This script is distributed in the hope that it will be useful, but     *
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
- * Public License for more details.                                       *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
  *                                                                        */
 
 /**
@@ -26,10 +33,8 @@
  * Output:
  * http://www.typo3.org
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: ExternalViewHelper.php 725 2009-05-28 21:45:46Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ * @api
  * @scope prototype
  */
 class Tx_Fluid_ViewHelpers_Uri_ExternalViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
@@ -38,6 +43,7 @@ class Tx_Fluid_ViewHelpers_Uri_ExternalViewHelper extends Tx_Fluid_Core_ViewHelp
 	 * @param string $uri the target URI
 	 * @return string rendered URI
 	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @api
 	 */
 	public function render($uri) {
 		return $uri;
@@ -45,4 +51,4 @@ class Tx_Fluid_ViewHelpers_Uri_ExternalViewHelper extends Tx_Fluid_Core_ViewHelp
 }
 
 
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php
new file mode 100644
index 0000000000000000000000000000000000000000..5c52af5e904e0c6b2feb4427bfb32d6062c26044
--- /dev/null
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php
@@ -0,0 +1,79 @@
+<?php
+
+/*                                                                        *
+ * This script is part of the TYPO3 project - inspiring people to share!  *
+ *                                                                        *
+ * TYPO3 is free software; you can redistribute it and/or modify it under *
+ * the terms of the GNU General Public License version 2 as published by  *
+ * the Free Software Foundation.                                          *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
+ * Public License for more details.                                       *
+ *                                                                        */
+
+/*
+ * renders a image according to the given dimensions
+ *
+ * @return relative path to the image (typo3temp/...)
+ * 
+ */
+class Tx_Fluid_ViewHelpers_Uri_ImageViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper {
+
+	/**
+	 * @var	tslib_cObj
+	 */
+	protected $contentObject;
+
+
+	/**
+	 * Constructor. Used to create an instance of tslib_cObj used by the render() method.
+	 *
+	 * @param tslib_cObj $contentObject injector for tslib_cObj (optional)
+	 * @return void
+	 */
+	public function __construct($contentObject = NULL) {
+		$this->contentObject = $contentObject !== NULL ? $contentObject : t3lib_div::makeInstance('tslib_cObj');
+		if (TYPO3_MODE === 'BE') {
+			throw new Tx_Fluid_Core_ViewHelper_Exception('uri.image ViewHelper does not (yet) work in backend mode' , 1277367648);
+		}
+	}
+
+	/**
+	 * Resizes the image (if required) and returns its path. If the image was not resized, the path will be equal to $src
+	 * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
+	 *
+	 * @param string $src
+	 * @param string $width width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
+	 * @param string $height height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
+	 * @param integer $minWidth minimum width of the image
+	 * @param integer $minHeight minimum height of the image
+	 * @param integer $maxWidth maximum width of the image
+	 * @param integer $maxHeight maximum height of the image
+	 * @return string path to the image
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Christian Baer <chr.baer@googlemail.com>
+	 */
+	public function render($src, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL) {
+		$setup = array(
+			'width' => $width,
+			'height' => $height,
+			'minW' => $minWidth,
+			'minH' => $minHeight,
+			'maxW' => $maxWidth,
+			'maxH' => $maxHeight
+		);
+		$imageInfo = $this->contentObject->getImgResource($src, $setup);
+		$GLOBALS['TSFE']->lastImageInfo = $imageInfo;
+		if (!is_array($imageInfo)) {
+			throw new Tx_Fluid_Core_ViewHelper_Exception('Could not get image resource for "' . htmlspecialchars($src) . '".' , 1277367645);
+		}
+		$imageInfo[3] = t3lib_div::png_to_gif_by_imagemagick($imageInfo[3]);
+		$GLOBALS['TSFE']->imagesOnPage[] = $imageInfo[3];
+
+		$imageSource = $GLOBALS['TSFE']->absRefPrefix . t3lib_div::rawUrlEncodeFP($imageInfo[3]);
+
+		return $imageSource;
+	}
+}
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
index 48f8bb74dcfbcc474cfc56a50c8ad89af87fb37a..3ba615c1d3885b2d1134d3bdd85f317ab81a44f1 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php
@@ -42,9 +42,6 @@
  * <a href="index.php?id=1&extension_key[foo]=bar">page link</f:link.action>
  * (depending on your TS configuration)
  *
- * @package Fluid
- * @subpackage ViewHelpers
- * @version $Id: PageViewHelper.php 2050 2010-03-16 10:56:16Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php
index 98f78450ba3f0cc35400195095fdd470cbe727f8..b9ac905065b5574708d2dbe5ac584a8a90d9ba3f 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php
@@ -26,7 +26,6 @@
  * <link href="Resources/Packages/MyPackage/stylesheet.css" rel="stylesheet" />
  * (depending on current package)
  *
- * @version $Id: ResourceViewHelper.php 1734 2009-11-25 21:53:57Z stucki $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
@@ -49,7 +48,7 @@ class Tx_Fluid_ViewHelpers_Uri_ResourceViewHelper extends Tx_Fluid_Core_ViewHelp
 		$uri = t3lib_div::getFileAbsFileName($uri);
 		$uri = substr($uri, strlen(PATH_site));
 
-		if (TYPO3_MODE === 'BE' && $absolute === FALSE) {
+		if (TYPO3_MODE === 'BE' && $absolute === FALSE && $uri !== FALSE) {
 			$uri = '../' . $uri;
 		}
 
@@ -60,4 +59,4 @@ class Tx_Fluid_ViewHelpers_Uri_ResourceViewHelper extends Tx_Fluid_Core_ViewHelp
 		return $uri;
 	}
 }
-?>
\ No newline at end of file
+?>
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php
index b1ec1dedbf1990ffdd965d231a5c58b21735645b..e619c14bff5abc9c70aaf9706c815acdae4f93da 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php
@@ -23,9 +23,6 @@
 /**
  * Test fixture for the child node access facet.
  *
- * @version $Id: ChildNodeAccessFacetViewHelper.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage Core\Parser\Fixtures
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 abstract class Tx_Fluid_Core_Parser_Fixtures_ChildNodeAccessFacetViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php
index c9acdd53e502c6aabce1c5a0e00b0f34d8254a34..afd380828b3e3a6ed2473e77628ccf7c3ea3d104 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/Interceptor/EscapeTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for Interceptor\Escape
  *
- * @version $Id: EscapeTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_Interceptor_EscapeTest extends Tx_Extbase_BaseTestCase {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php
index 5fa0838c0cd57c8bfc2612672fc1d5810cab2cfb..79e646ff0b8092f3b7b7e919999ec370ada54d02 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/ParsingStateTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for ParsingState
  *
- * @version $Id: ParsingStateTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_ParsingStateTest extends Tx_Extbase_BaseTestCase {
@@ -67,12 +66,10 @@ class Tx_Fluid_Core_Parser_ParsingStateTest extends Tx_Extbase_BaseTestCase {
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	public function renderCallsTheRightMethodsOnTheRootNode() {
-		$renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
+		$renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContextInterface');
 
 		$rootNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_RootNode');
-		$rootNode->expects($this->once())->method('setRenderingContext')->with($renderingContext);
-
-		$rootNode->expects($this->once())->method('evaluate')->will($this->returnValue('T3DD09 Rock!'));
+		$rootNode->expects($this->once())->method('evaluate')->with($renderingContext)->will($this->returnValue('T3DD09 Rock!'));
 		$this->parsingState->setRootNode($rootNode);
 		$renderedValue = $this->parsingState->render($renderingContext);
 		$this->assertEquals($renderedValue, 'T3DD09 Rock!', 'The rendered value of the Root Node is not returned by the ParsingState.');
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php
index d70802fcf903b4f106d1495ca76bf6ec79c9a708..6fe431efd9f0da1fe18e4a96e54034245f2b134b 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: AbstractNodeTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNodeTest extends Tx_Extbase_BaseTestCase {
@@ -36,7 +35,6 @@ class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNodeTest extends Tx_Extbase_BaseTe
 		$this->renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext', array(), array(), '', FALSE);
 
 		$this->abstractNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode', array('evaluate'));
-		$this->abstractNode->setRenderingContext($this->renderingContext);
 
 		$this->childNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode');
 		$this->abstractNode->addChildNode($this->childNode);
@@ -47,8 +45,8 @@ class Tx_Fluid_Core_Parser_SyntaxTree_AbstractNodeTest extends Tx_Extbase_BaseTe
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	public function evaluateChildNodesPassesRenderingContextToChildNodes() {
-		$this->childNode->expects($this->once())->method('setRenderingContext')->with($this->renderingContext);
-		$this->abstractNode->evaluateChildNodes();
+		$this->childNode->expects($this->once())->method('evaluate')->with($this->renderingContext);
+		$this->abstractNode->evaluateChildNodes($this->renderingContext);
 	}
 
 	/**
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php
index 8f7a9e34c58bd14706c4f283287bc53ed0d83de2..474ad4b50fd4665fee7b4ee892c3555218b7ceef 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for TextNode
  *
- * @version $Id: TextNodeTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_TextNodeTest extends Tx_Extbase_BaseTestCase {
@@ -35,7 +34,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_TextNodeTest extends Tx_Extbase_BaseTestCa
 	public function renderReturnsSameStringAsGivenInConstructor() {
 		$string = 'I can work quite effectively in a train!';
 		$node = new Tx_Fluid_Core_Parser_SyntaxTree_TextNode($string);
-		$this->assertEquals($node->evaluate(), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
+		$this->assertEquals($node->evaluate($this->getMock('Tx_Fluid_Core_Rendering_RenderingContext')), $string, 'The rendered string of a text node is not the same as the string given in the constructor.');
 	}
 
 	/**
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php
index af1c18131c2b376cf73ab0554942782ea598baf6..438a969b5116e2158ea90174ed476abae918cd94 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for ViewHelperNode's evaluateBooleanExpression()
  *
- * @version $Id: ViewHelperNodeComparatorTest.php 4483 2010-06-10 13:57:32Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Extbase_BaseTestCase {
@@ -33,13 +32,18 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 	 */
 	protected $viewHelperNode;
 
+	/**
+	 * @var Tx_Fluid_Core_Rendering_RenderingContextInterface
+	 */
+	protected $renderingContext;
+
 	/**
 	 * Setup fixture
 	 * @author Karsten Dambekalns <karsten@typo3.org>
 	 */
 	public function setUp() {
 		$this->viewHelperNode = $this->getAccessibleMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('dummy'), array(), '', FALSE);
-		$this->viewHelperNode->setRenderingContext(new Tx_Fluid_Core_Rendering_RenderingContext());
+		$this->renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContextInterface');
 	}
 
 	/**
@@ -51,7 +55,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_RootNode');
 		$rootNode->expects($this->once())->method('getChildNodes')->will($this->returnValue(array(1,2,3,4)));
 
-		$this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode);
+		$this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext);
 	}
 
 	/**
@@ -64,7 +68,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('=='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('5'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -77,7 +81,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('=='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('3'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -90,7 +94,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('!='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('5'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -103,7 +107,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('!='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('3'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -116,7 +120,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('%'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('2'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -129,7 +133,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('%'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('2'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -142,7 +146,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('>'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('9'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -155,7 +159,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('>'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -168,7 +172,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('>='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('9'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -181,7 +185,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('>='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -194,7 +198,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('>='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('11'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -207,7 +211,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('<'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -220,7 +224,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('<'));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -233,7 +237,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('<='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -246,7 +250,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('<='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertTrue($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 	/**
@@ -259,7 +263,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeComparatorTest extends Tx_Ex
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('<='));
 		$rootNode->addChildNode(new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('10'));
 
-		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode));
+		$this->assertFalse($this->viewHelperNode->_call('evaluateBooleanExpression', $rootNode, $this->renderingContext));
 	}
 
 }
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
index eeac250835a1be41e727f80e01d55039f7354cc0..0d814574c8098a2a205d0f538b614c3bf569f29f 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php
@@ -26,7 +26,6 @@ require_once(dirname(__FILE__) . '/../../Fixtures/TestViewHelper.php');
 /**
  * Testcase for [insert classname here]
  *
- * @version $Id: ViewHelperNodeTest.php 4005 2010-03-23 14:28:15Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_BaseTestCase {
@@ -71,13 +70,13 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 		$this->renderingContext->injectObjectManager($this->mockObjectManager);
 
 		$this->templateVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
-		$this->renderingContext->setTemplateVariableContainer($this->templateVariableContainer);
+		$this->renderingContext->injectTemplateVariableContainer($this->templateVariableContainer);
 
 		$this->controllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext', array(), array(), '', FALSE);
 		$this->renderingContext->setControllerContext($this->controllerContext);
 
 		$this->viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
-		$this->renderingContext->setViewHelperVariableContainer($this->viewHelperVariableContainer);
+		$this->renderingContext->injectViewHelperVariableContainer($this->viewHelperVariableContainer);
 	}
 
 	/**
@@ -101,7 +100,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 	public function childNodeAccessFacetWorksAsExpected() {
 		$childNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', array(), array('foo'));
 
-		$mockViewHelper = $this->getMock('Tx_Fluid_Core_Parser_Fixtures_ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments', 'setRenderingContext'));
+		$mockViewHelper = $this->getMock('Tx_Fluid_Core_Parser_Fixtures_ChildNodeAccessFacetViewHelper', array('setChildNodes', 'initializeArguments', 'render', 'prepareArguments'));
 
 		$mockViewHelperArguments = $this->getMock('Tx_Fluid_Core_ViewHelper_Arguments', array(), array(), '', FALSE);
 
@@ -112,8 +111,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 
 		$mockViewHelper->expects($this->once())->method('setChildNodes')->with($this->equalTo(array($childNode)));
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -131,8 +129,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 
 		$viewHelperNode = new Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode($mockViewHelper, array());
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -160,8 +157,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 			'param1' => new Tx_Fluid_Core_Parser_SyntaxTree_TextNode('a'),
 		));
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -177,8 +173,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 
 		$this->mockObjectManager->expects($this->once())->method('create')->with('Tx_Fluid_Core_ViewHelper_Arguments')->will($this->returnValue($mockViewHelperArguments));
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -194,8 +189,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 
 		$this->mockObjectManager->expects($this->once())->method('create')->with('Tx_Fluid_Core_ViewHelper_Arguments')->will($this->returnValue($mockViewHelperArguments));
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -212,9 +206,8 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 		$this->mockObjectManager->expects($this->at(0))->method('create')->with('Tx_Fluid_Core_ViewHelper_Arguments')->will($this->returnValue($mockViewHelperArguments));
 		$this->mockObjectManager->expects($this->at(1))->method('create')->with('Tx_Fluid_Core_ViewHelper_Arguments')->will($this->returnValue($mockViewHelperArguments));
 
-		$viewHelperNode->setRenderingContext($this->renderingContext);
-		$viewHelperNode->evaluate();
-		$viewHelperNode->evaluate();
+		$viewHelperNode->evaluate($this->renderingContext);
+		$viewHelperNode->evaluate($this->renderingContext);
 	}
 
 	/**
@@ -223,13 +216,12 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 	 */
 	public function convertArgumentValueCallsConvertToBooleanForArgumentsOfTypeBoolean() {
 		$viewHelperNode = $this->getAccessibleMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('convertToBoolean'), array(), '', FALSE);
-		$viewHelperNode->_set('renderingContext', $this->renderingContext);
 		$argumentViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode', array('evaluate'), array(), '', FALSE);
 		$argumentViewHelperNode->expects($this->once())->method('evaluate')->will($this->returnValue('foo'));
 
 		$viewHelperNode->expects($this->once())->method('convertToBoolean')->with('foo')->will($this->returnValue('bar'));
 
-		$actualResult = $viewHelperNode->_call('convertArgumentValue', $argumentViewHelperNode, 'boolean');
+		$actualResult = $viewHelperNode->_call('convertArgumentValue', $argumentViewHelperNode, 'boolean', $this->renderingContext);
 		$this->assertEquals('bar', $actualResult);
 	}
 
@@ -268,6 +260,7 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNodeTest extends Tx_Extbase_Base
 
 		$this->assertFalse($viewHelperNode->_call('convertToBoolean', 0));
 		$this->assertFalse($viewHelperNode->_call('convertToBoolean', -1));
+		$this->assertFalse($viewHelperNode->_call('convertToBoolean', '-1'));
 		$this->assertFalse($viewHelperNode->_call('convertToBoolean', -.5));
 
 		$this->assertTrue($viewHelperNode->_call('convertToBoolean', 1));
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php
index 562aea9d4d33a4b09d06129f1784a2a51871d906..f30756a506155d514dbb9feb63b4c2d612e89f3e 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for Regular expressions in parser
  *
- * @version $Id: TemplateParserPatternTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_TemplateParserPatternTest extends Tx_Extbase_BaseTestCase {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
index d3d0910b6b345178ab6123a3c88a7db92ca4f283..27249d5b65c05006d33357afd0a1d48a21bee946 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php
@@ -28,7 +28,6 @@ require_once(dirname(__FILE__) . '/Fixtures/PostParseFacetViewHelper.php');
  * This is to at least half a system test, as it compares rendered results to
  * expectations, and does not strictly check the parsing...
  *
- * @version $Id: TemplateParserTest.php 3952 2010-03-16 08:00:53Z sebastian $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Parser_TemplateParserTest extends Tx_Extbase_BaseTestCase {
@@ -494,14 +493,6 @@ class Tx_Fluid_Core_Parser_TemplateParserTest extends Tx_Extbase_BaseTestCase {
 		$templateParser->_call('objectAccessorHandler', $mockState, 'objectAccessorString', '', '', '');
 	}
 
-	/**
-	 * @test
-	 * @author Karsten Dambekalns <karsten@typo3.org>
-	 */
-	public function viewHelperArgumentsAreNotRunThroughValueInterceptors() {
-		$this->markTestIncomplete('Needs implementation!');
-	}
-
 	/**
 	 * @author Karsten Dambekalns <karsten@typo3.org>
 	 */
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
index f753d1edd0a60eb174a1b6c73eb5ba1b2836c9e9..ab12d8304da025c4ec805bb806bff8ae463665ec 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
@@ -23,14 +23,13 @@
 /**
  * Testcase for ParsingState
  *
- * @version $Id: RenderingContextTest.php 4005 2010-03-23 14:28:15Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_Rendering_RenderingContextTest extends Tx_Extbase_BaseTestCase {
 
 	/**
 	 * Parsing state
-	 * @var Tx_Fluid_Core_Rendering_RenderingContext
+	 * @var Tx_Fluid_Core_Rendering_RenderingContextInterface
 	 */
 	protected $renderingContext;
 
@@ -44,7 +43,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest extends Tx_Extbase_BaseTestCa
 	 */
 	public function templateVariableContainerCanBeReadCorrectly() {
 		$templateVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
-		$this->renderingContext->setTemplateVariableContainer($templateVariableContainer);
+		$this->renderingContext->injectTemplateVariableContainer($templateVariableContainer);
 		$this->assertSame($this->renderingContext->getTemplateVariableContainer(), $templateVariableContainer, 'Template Variable Container could not be read out again.');
 	}
 
@@ -64,7 +63,7 @@ class Tx_Fluid_Core_Rendering_RenderingContextTest extends Tx_Extbase_BaseTestCa
 	 */
 	public function viewHelperVariableContainerCanBeReadCorrectly() {
 		$viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
-		$this->renderingContext->setViewHelperVariableContainer($viewHelperVariableContainer);
+		$this->renderingContext->injectViewHelperVariableContainer($viewHelperVariableContainer);
 		$this->assertSame($viewHelperVariableContainer, $this->renderingContext->getViewHelperVariableContainer());
 	}
 }
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/TagBasedViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/Core/TagBasedViewHelperTest.php
index eaa5f120e4e1d548b5ede8b8d0ad4eb8f073b8b8..bfb6f94227293c3d8683dcf06f4269ea64358716 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/TagBasedViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/TagBasedViewHelperTest.php
@@ -21,15 +21,14 @@
  *                                                                        */
 
 /**
- * Testcase for TagBasedViewHelper
+ * Testcase for AbstractTagBasedViewHelper
  *
- * @version $Id: TagBasedViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
-class Tx_Fluid_Core_TagBasedViewHelperTest extends Tx_Extbase_BaseTestCase {
+class Tx_Fluid_Core_AbstractTagBasedViewHelperTest extends Tx_Extbase_BaseTestCase {
 
 	public function setUp() {
-		$this->viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_ViewHelper_TagBasedViewHelper', array('dummy'), array(), '', FALSE);
+		$this->viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper', array('dummy'), array(), '', FALSE);
 	}
 
 	/**
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/TagBuilderTest.php b/typo3/sysext/fluid/Tests/Unit/Core/TagBuilderTest.php
index a2de48927cd311afb407f1d673eef9aeaa9bcdee..dd887e02a35b4283a0d653bdd986122641fe0ee5 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/TagBuilderTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/TagBuilderTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for TagBuilder
  *
- * @version $Id: TagBuilderTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_TagBuilderTest extends Tx_Extbase_BaseTestCase {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
index be92b47efaa587c8660a5c476970bf826e5a062e..f53a16f94593be5c82aa3d0263371441f8229914 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../Fixtures/TestViewHelper.php');
 /**
  * Testcase for AbstractViewHelper
  *
- * @version $Id: AbstractViewHelperTest.php 4483 2010-06-10 13:57:32Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest extends Tx_Extbase_BaseTestCase {
@@ -66,6 +65,43 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest extends Tx_Extbase_BaseTes
 		$viewHelper->_call('registerArgument', $name, "integer", $isRequired, $description);
 	}
 
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function overrideArgumentOverwritesExistingArgumentDefinition() {
+		$mockReflectionService = $this->getMock('Tx_Extbase_Reflection_Service', array(), array(), '', FALSE);
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_ViewHelper_AbstractViewHelper', array('render'), array(), '', FALSE);
+		$viewHelper->injectReflectionService($mockReflectionService);
+
+		$name = 'argumentName';
+		$description = 'argument description';
+		$overriddenDescription = 'overwritten argument description';
+		$type = 'string';
+		$overriddenType = 'integer';
+		$isRequired = TRUE;
+		$expected = new Tx_Fluid_Core_ViewHelper_ArgumentDefinition($name, $overriddenType, $overriddenDescription, $isRequired);
+
+		$viewHelper->_call('registerArgument', $name, $type, $isRequired, $description);
+		$viewHelper->_call('overrideArgument', $name, $overriddenType, $isRequired, $overriddenDescription);
+		$this->assertEquals($viewHelper->prepareArguments(), array($name => $expected), 'Argument definitions not returned correctly. The original ArgumentDefinition could not be overridden.');
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @expectedException Tx_Fluid_Core_ViewHelper_Exception
+	 */
+	public function overrideArgumentThrowsExceptionWhenTryingToOverwriteAnNonexistingArgument() {
+		$mockReflectionService = $this->getMock('Tx_Extbase_Reflection_Service', array(), array(), '', FALSE);
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_ViewHelper_AbstractViewHelper', array('render'), array(), '', FALSE);
+		$viewHelper->injectReflectionService($mockReflectionService);
+
+		$viewHelper->_call('overrideArgument', 'argumentName', 'string', TRUE, 'description');
+	}
+
 	/**
 	 * @test
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
@@ -190,7 +226,7 @@ class Tx_Fluid_Core_ViewHelper_AbstractViewHelperTest extends Tx_Extbase_BaseTes
 	/**
 	 * @test
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 * @expectedException \InvalidArgumentException
+	 * @expectedException InvalidArgumentException
 	 */
 	public function validateArgumentsCallsTheRightValidatorsAndThrowsExceptionIfValidationIsWrong() {
 		$mockReflectionService = $this->getMock('Tx_Extbase_Reflection_Service', array(), array(), '', FALSE);
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php
index 6341f44acca8bc809dbee5972e2d38c7c887f4c6..8a2dbcbbf6648d24a50e2f028151824d84c77aae 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for Tx_Fluid_Core_ViewHelper_ArgumentDefinition
  *
- * @version $Id: ArgumentDefinitionTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_ArgumentDefinitionTest extends Tx_Extbase_BaseTestCase {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ConditionViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ConditionViewHelperTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4d59a842687207cac95b63fcad7d6204e387fa0c
--- /dev/null
+++ b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ConditionViewHelperTest.php
@@ -0,0 +1,165 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+require_once(dirname(__FILE__) . '/../../ViewHelpers/ViewHelperBaseTestcase.php');
+
+/**
+ * Testcase for Condition ViewHelper
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
+
+	/**
+	 * var Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper
+	 */
+	protected $viewHelper;
+
+	/**
+	 * var Tx_Fluid_Core_ViewHelper_Arguments
+	 */
+	protected $mockArguments;
+
+	public function setUp() {
+		parent::setUp();
+		$this->viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_ViewHelper_AbstractConditionViewHelper', array('getRenderingContext', 'renderChildren'));
+		$this->viewHelper->expects($this->any())->method('getRenderingContext')->will($this->returnValue($this->renderingContext));
+		$this->injectDependenciesIntoViewHelper($this->viewHelper);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderThenChildReturnsAllChildrenIfNoThenViewHelperChildExists() {
+		$this->viewHelper->expects($this->at(0))->method('renderChildren')->will($this->returnValue('foo'));
+
+		$actualResult = $this->viewHelper->_call('renderThenChild');
+		$this->assertEquals('foo', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderThenChildReturnsThenViewHelperChildIfConditionIsTrueAndThenViewHelperChildExists() {
+		$mockThenViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate'), array(), '', FALSE);
+		$mockThenViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('Tx_Fluid_ViewHelpers_ThenViewHelper'));
+		$mockThenViewHelperNode->expects($this->at(1))->method('evaluate')->with($this->renderingContext)->will($this->returnValue('ThenViewHelperResults'));
+
+		$this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
+		$actualResult = $this->viewHelper->_call('renderThenChild');
+		$this->assertEquals('ThenViewHelperResults', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderElseChildReturnsEmptyStringIfConditionIsFalseAndNoElseViewHelperChildExists() {
+		$actualResult = $this->viewHelper->_call('renderElseChild');
+		$this->assertEquals('', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderElseChildRendersElseViewHelperChildIfConditionIsFalseAndNoThenViewHelperChildExists() {
+		$mockElseViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+		$mockElseViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('Tx_Fluid_ViewHelpers_ElseViewHelper'));
+		$mockElseViewHelperNode->expects($this->at(1))->method('evaluate')->with($this->renderingContext)->will($this->returnValue('ElseViewHelperResults'));
+
+		$this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
+		$actualResult = $this->viewHelper->_call('renderElseChild');
+		$this->assertEquals('ElseViewHelperResults', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderThenChildReturnsValueOfThenArgumentIfConditionIsTrue() {
+		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('then')->will($this->returnValue(TRUE));
+		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('then')->will($this->returnValue('ThenArgument'));
+
+		$actualResult = $this->viewHelper->_call('renderThenChild');
+		$this->assertEquals('ThenArgument', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function thenArgumentHasPriorityOverChildNodesIfConditionIsTrue() {
+		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContextInterface');
+
+		$mockThenViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+		$mockThenViewHelperNode->expects($this->never())->method('evaluate');
+
+		$this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
+		$this->viewHelper->setRenderingContext($mockRenderingContext);
+
+		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('then')->will($this->returnValue(TRUE));
+		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('then')->will($this->returnValue('ThenArgument'));
+
+		$actualResult = $this->viewHelper->_call('renderThenChild');
+		$this->assertEquals('ThenArgument', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderReturnsValueOfElseArgumentIfConditionIsFalse() {
+		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('else')->will($this->returnValue(TRUE));
+		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('else')->will($this->returnValue('ElseArgument'));
+
+		$actualResult = $this->viewHelper->_call('renderElseChild');
+		$this->assertEquals('ElseArgument', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function elseArgumentHasPriorityOverChildNodesIfConditionIsFalse() {
+		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContextInterface');
+
+		$mockElseViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
+		$mockElseViewHelperNode->expects($this->never())->method('evaluate');
+
+		$this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
+		$this->viewHelper->setRenderingContext($mockRenderingContext);
+
+		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('else')->will($this->returnValue(TRUE));
+		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('else')->will($this->returnValue('ElseArgument'));
+
+		$actualResult = $this->viewHelper->_call('renderElseChild');
+		$this->assertEquals('ElseArgument', $actualResult);
+	}
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php
index ffcdb1834bad8d807548e7ef9c8da75f8268335b..76433027ea326b68af77156af86bc7f9f4cc0197 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php
@@ -23,7 +23,6 @@
 /**
  * Testcase for TemplateVariableContainer
  *
- * @version $Id: TemplateVariableContainerTest.php 4494 2010-06-11 13:05:24Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_ViewHelper_TemplateVariableContainerTest extends Tx_Extbase_BaseTestCase {
diff --git a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
index 4b61a4d6f0e97cce4cedddcd2c77ad82da1ebe65..73b8629e1d17032b0f8c7dcfe67588c36664cc28 100644
--- a/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../Fixtures/TestViewHelper.php');
 /**
  * Testcase for AbstractViewHelper
  *
- * @version $Id: ViewHelperVariableContainerTest.php 4483 2010-06-10 13:57:32Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest extends Tx_Extbase_BaseTestCase {
@@ -105,7 +104,7 @@ class Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainerTest extends Tx_Extbas
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	public function viewCanBeReadOutAgain() {
-		$view = $this->getMock('Tx_Extbase_MVC_View_ViewInterface');
+		$view = $this->getMock('Tx_Fluid_View_AbstractTemplateView', array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'hasTemplate'));
 		$this->viewHelperVariableContainer->setView($view);
 		$this->assertSame($view, $this->viewHelperVariableContainer->getView());
 	}
diff --git a/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php b/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d5c62890d129542eb02e9149fc17b3f7bdf52202
--- /dev/null
+++ b/typo3/sysext/fluid/Tests/Unit/View/AbstractTemplateViewTest.php
@@ -0,0 +1,139 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ * Testcase for the TemplateView
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class Tx_Fluid_View_AbstractTemplateViewTest extends Tx_Extbase_BaseTestCase {
+
+	/**
+	 * @var Tx_Fluid_View_AbstractTemplateView
+	 */
+	protected $view;
+
+	/**
+	 * @var Tx_Fluid_Core_Rendering_RenderingContext
+	 */
+	protected $renderingContext;
+
+	/**
+	 * @var Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer
+	 */
+	protected $viewHelperVariableContainer;
+
+	/**
+	 * @var Tx_Fluid_Core_ViewHelper_TemplateVariableContainer
+	 */
+	protected $templateVariableContainer;
+
+	/**
+	 * Sets up this test case
+	 * @return void
+	 */
+	public function setUp() {
+		$this->templateVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer', array('exists', 'remove', 'add'));
+		$this->viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer', array('setView'));
+		$this->renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext', array('getViewHelperVariableContainer', 'getTemplateVariableContainer'));
+		$this->renderingContext->expects($this->any())->method('getViewHelperVariableContainer')->will($this->returnValue($this->viewHelperVariableContainer));
+		$this->renderingContext->expects($this->any())->method('getTemplateVariableContainer')->will($this->returnValue($this->templateVariableContainer));
+		$this->view = $this->getMock('Tx_Fluid_View_AbstractTemplateView', array('getTemplateSource', 'getLayoutSource', 'getPartialSource', 'hasTemplate'));
+		$this->view->setRenderingContext($this->renderingContext);
+	}
+
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function viewIsPlacedInViewHelperVariableContainer() {
+		$this->viewHelperVariableContainer->expects($this->once())->method('setView')->with($this->view);
+		$this->view->setRenderingContext($this->renderingContext);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function assignAddsValueToTemplateVariableContainer() {
+		$this->templateVariableContainer->expects($this->at(0))->method('exists')->with('foo')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('foo', 'FooValue');
+		$this->templateVariableContainer->expects($this->at(2))->method('exists')->with('bar')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(3))->method('add')->with('bar', 'BarValue');
+
+		$this->view
+			->assign('foo', 'FooValue')
+			->assign('bar', 'BarValue');
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function assignCanOverridePreviouslyAssignedValues() {
+		$this->templateVariableContainer->expects($this->at(0))->method('exists')->with('foo')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('foo', 'FooValue');
+		$this->templateVariableContainer->expects($this->at(2))->method('exists')->with('foo')->will($this->returnValue(TRUE));
+		$this->templateVariableContainer->expects($this->at(3))->method('remove')->with('foo');
+		$this->templateVariableContainer->expects($this->at(4))->method('add')->with('foo', 'FooValueOverridden');
+
+		$this->view->assign('foo', 'FooValue');
+		$this->view->assign('foo', 'FooValueOverridden');
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function assignMultipleAddsValuesToTemplateVariableContainer() {
+		$this->templateVariableContainer->expects($this->at(0))->method('exists')->with('foo')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('foo', 'FooValue');
+		$this->templateVariableContainer->expects($this->at(2))->method('exists')->with('bar')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(3))->method('add')->with('bar', 'BarValue');
+		$this->templateVariableContainer->expects($this->at(4))->method('exists')->with('baz')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(5))->method('add')->with('baz', 'BazValue');
+
+		$this->view
+			->assignMultiple(array('foo' => 'FooValue', 'bar' => 'BarValue'))
+			->assignMultiple(array('baz' => 'BazValue'));
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function assignMultipleCanOverridePreviouslyAssignedValues() {
+		$this->templateVariableContainer->expects($this->at(0))->method('exists')->with('foo')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('foo', 'FooValue');
+		$this->templateVariableContainer->expects($this->at(2))->method('exists')->with('foo')->will($this->returnValue(TRUE));
+		$this->templateVariableContainer->expects($this->at(3))->method('remove')->with('foo');
+		$this->templateVariableContainer->expects($this->at(4))->method('add')->with('foo', 'FooValueOverridden');
+		$this->templateVariableContainer->expects($this->at(5))->method('exists')->with('bar')->will($this->returnValue(FALSE));
+		$this->templateVariableContainer->expects($this->at(6))->method('add')->with('bar', 'BarValue');
+
+		$this->view->assign('foo', 'FooValue');
+		$this->view->assignMultiple(array('foo' => 'FooValueOverridden', 'bar' => 'BarValue'));
+	}
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php b/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php
index 5e3d1f6500c1ad7c527dfbd141d9d80a3b5abd7e..19b893db5cf5f4f0c0c37b442dd5407a9d43e747 100644
--- a/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php
+++ b/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TemplateViewFixture.php
@@ -23,9 +23,6 @@
 /**
  * [Enter description here]
  *
- * @version $Id: TemplateViewFixture.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage View\Fixture
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_View_Fixture_TemplateViewFixture extends Tx_Fluid_View_TemplateView {
diff --git a/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php b/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
index d08d00ab0d17225c0e435cf0f7aab51a00277a1d..41e1bce7e2df14c589627ac94b0bcd0b9d4d10a6 100644
--- a/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
+++ b/typo3/sysext/fluid/Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php
@@ -23,15 +23,12 @@
 /**
  * [Enter description here]
  *
- * @version $Id: TransparentSyntaxTreeNode.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage View\Fixture
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_View_Fixture_TransparentSyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode {
 	public $variableContainer;
 
-	public function evaluate() {
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 	}
 }
 
diff --git a/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php b/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php
index 28363d65c944b405aa8edccfed35105b3bbd5d8d..d41a27df44aa4386b0877fdfae50db03fef2caf8 100644
--- a/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php
@@ -26,15 +26,10 @@ include_once(dirname(__FILE__) . '/Fixtures/TemplateViewFixture.php');
 /**
  * Testcase for the TemplateView
  *
- * @version $Id: TemplateViewTest.php 4334 2010-05-28 10:06:01Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_View_TemplateViewTest extends Tx_Extbase_BaseTestCase {
 
-	public function initializeViewSetsParserConfiguration() {
-		$this->markTestSkipped('incomplete, needs to be written!');
-	}
-
 	/**
 	 * @test
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
@@ -175,76 +170,15 @@ class Tx_Fluid_View_TemplateViewTest extends Tx_Extbase_BaseTestCase {
 		$this->assertEquals($expected, $actual, 'A set partial root path was not returned correctly.');
 	}
 
-	/**
-	 * @test
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function renderCallsRenderOnParsedTemplateInterface() {
-		$templateView = $this->getAccessibleMock('Tx_Fluid_View_TemplateView', array('parseTemplate', 'resolveTemplatePathAndFilename', 'buildParserConfiguration'), array(), '', FALSE);
-		$parsedTemplate = $this->getMock('Tx_Fluid_Core_Parser_ParsedTemplateInterface');
-		$objectManager = $this->getMock('Tx_Fluid_Compatibility_ObjectManager');
-		$controllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext', array(), array(), '', FALSE);
-
-		$variableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_TemplateVariableContainer');
-		$renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext', array(), array(), '', FALSE);
-
-		$viewHelperVariableContainer = $this->getMock('Tx_Fluid_Core_ViewHelper_ViewHelperVariableContainer');
-		$objectManager->expects($this->exactly(3))->method('create')->will($this->onConsecutiveCalls($variableContainer, $renderingContext, $viewHelperVariableContainer));
-
-		$templateView->_set('objectManager', $objectManager);
-		$templateView->injectTemplateParser($this->getMock('Tx_Fluid_Core_Parser_TemplateParser'));
-		$templateView->setControllerContext($controllerContext);
-
-		$templateView->expects($this->once())->method('parseTemplate')->will($this->returnValue($parsedTemplate));
-
-			// Real expectations
-		$parsedTemplate->expects($this->once())->method('render')->with($renderingContext)->will($this->returnValue('Hello World'));
-
-		$this->assertEquals('Hello World', $templateView->render(), 'The output of the ParsedTemplates render Method is not returned by the TemplateView');
-	}
-
-	/**
-	 * @test
-	 * @author Robert Lemke <robert@typo3.org>
-	 */
-	public function parseTemplateReadsTheGivenTemplateAndReturnsTheParsedResult() {
-		$mockTemplateParser = $this->getMock('Tx_Fluid_Core_Parser_TemplateParser', array('parse'));
-		$mockTemplateParser->expects($this->once())->method('parse')->with('Unparsed Template')->will($this->returnValue('Parsed Template'));
-
-		$templateView = $this->getAccessibleMock('Tx_Fluid_View_TemplateView', array('dummy'), array(), '', FALSE);
-		$templateView->injectTemplateParser($mockTemplateParser);
-
-		$parsedTemplate = $templateView->_call('parseTemplate', dirname(__FILE__) . '/Fixtures/UnparsedTemplateFixture.html');
-		$this->assertSame('Parsed Template', $parsedTemplate);
-	}
-
-	/**
-	 * @test
-	 * @expectedException Tx_Fluid_View_Exception_InvalidTemplateResourceException
-	 * @author Robert Lemke <robert@typo3.org>
-	 */
-	public function parseTemplateThrowsAnExceptionIfTheSpecifiedTemplateResourceDoesNotExist() {
-		$templateView = $this->getAccessibleMock('Tx_Fluid_View_TemplateView', array('dummy'), array(), '', FALSE);
-		$templateView->_call('parseTemplate', 'foo');
-	}
-
 	/**
 	 * @test
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
 	public function pathToPartialIsResolvedCorrectly() {
-		$this->markTestSkipped('Needs proper implementation.');
-		$mockRequest = $this->getMock('Tx_Fluid_MVC_Request', array('getControllerPackageKey', ''));
-		$mockRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue('DummyPackageKey'));
-		$mockControllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext', array('getRequest'));
-		$mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($mockRequest));
-
-		$mockPackage = $this->getMock('Tx_Fluid_Package_PackageInterface', array('getPackagePath'));
-		$mockPackage->expects($this->any())->method('getPackagePath')->will($this->returnValue('/ExamplePackagePath/'));
-		$mockPackageManager = $this->getMock('Tx_Fluid_Package_PackageManagerInterface', array('getPackage'));
-		$mockPackageManager->expects($this->any())->method('getPackage')->with('DummyPackageKey')->will($this->returnValue($mockPackage));
-
+		$this->markTestSkipped('Needs to be finished');
 		vfsStreamWrapper::register();
+		mkdir('vfs://MyTemplates');
+		file_put_contents('vfs://MyTemplates/MyCoolAction.html', 'contentsOfMyCoolAction');
 		$mockRootDirectory = vfsStreamDirectory::create('ExamplePackagePath/Resources/Private/Partials');
 		$mockRootDirectory->getChild('Resources/Private/Partials')->addChild('Partials');
 		vfsStreamWrapper::setRoot($mockRootDirectory);
@@ -252,75 +186,14 @@ class Tx_Fluid_View_TemplateViewTest extends Tx_Extbase_BaseTestCase {
 		$this->getAccessibleMock('Tx_Fluid_Core_Parser_TemplateParser', array(''), array(), '', FALSE);
 	}
 
-	/**
-	 * @test
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function viewIsPlacedInVariableContainer() {
-		$this->markTestSkipped('view will be placed in ViewHelperContext soon');
-		$packageManager = t3lib_div::makeInstance('Tx_Fluid_Package_PackageManagerInterface');
-		$resourceManager = t3lib_div::makeInstance('Tx_Fluid_Resource_ResourceManager');
-
-		$syntaxTreeNode = new Tx_Fluid_View_Fixture_TransparentSyntaxTreeNode();
-
-		$parsingState = new Tx_Fluid_Core_Parser_ParsingState();
-		$parsingState->setRootNode($syntaxTreeNode);
-
-		$templateParserMock = $this->getMock('Tx_Fluid_Core_Parser_TemplateParser', array('parse'));
-		$templateParserMock->expects($this->any())->method('parse')->will($this->returnValue($parsingState));
-
-		$mockRequest = $this->getMock('Tx_Extbase_MVC_Request');
-		$mockRequest->expects($this->any())->method('getControllerActionName')->will($this->returnValue('index'));
-		$mockRequest->expects($this->any())->method('getControllerObjectName')->will($this->returnValue('Tx_Fluid_Foo_Bar_Controller_BazController'));
-		$mockRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue('Fluid'));
-		$mockControllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext', array('getRequest'), array(), '', FALSE);
-		$mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($mockRequest));
-
-		$templateView = new Tx_Fluid_View_Fixture_TemplateViewFixture(new Tx_Fluid_Compatibility_ObjectManager(), $packageManager, $resourceManager, new Tx_Fluid_Compatibility_ObjectManager());
-		$templateView->injectTemplateParser($templateParserMock);
-		$templateView->setTemplatePathAndFilename(dirname(__FILE__) . '/Fixtures/TemplateViewSectionFixture.html');
-		$templateView->setLayoutPathAndFilename(dirname(__FILE__) . '/Fixtures/LayoutFixture.html');
-		$templateView->setControllerContext($mockControllerContext);
-		$templateView->initializeObject();
-		$templateView->addVariable('name', 'value');
-		$templateView->render();
-
-		$this->assertSame($templateView, $syntaxTreeNode->variableContainer->get('view'), 'The view has not been placed in the variable container.');
-		$this->assertEquals('value', $syntaxTreeNode->variableContainer->get('name'), 'Context variable has been set.');
-	}
-
-	/**
-	 * @test
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function renderSingleSectionWorks() {
-		$this->markTestSkipped('needs refactoring - this is a functional test with too many side effects');
-		$templateView = new Tx_Fluid_View_TemplateView();
-		$templateView->setTemplatePathAndFilename(dirname(__FILE__) . '/Fixtures/TemplateViewSectionFixture.html');
-		$this->assertEquals($templateView->renderSection('mySection'), 'Output', 'Specific section was not rendered correctly!');
-	}
-
-	/**
-	 * @test
-	 * @author Sebastian Kurfürst <sebastian@typo3.org>
-	 */
-	public function layoutEngineMergesTemplateAndLayout() {
-		$this->markTestSkipped('needs refactoring - this is a functional test with too many side effects');
-		$templateView = new Tx_Fluid_View_TemplateView();
-		$templateView->setTemplatePathAndFilename(dirname(__FILE__) . '/Fixtures/TemplateViewSectionFixture.html');
-		$templateView->setLayoutPathAndFilename(dirname(__FILE__) . '/Fixtures/LayoutFixture.html');
-		$this->assertEquals($templateView->renderWithLayout('LayoutFixture'), '<div>Output</div>', 'Specific section was not rendered correctly!');
-	}
-
 	/**
 	 * @test
 	 * @author Robert Lemke <robert@typo3.org>
 	 */
-	public function resolveTemplatePathAndFilenameChecksDifferentPathPatternsAndReturnsTheFirstPathWhichExists() {
-		$this->markTestSkipped('vfs not yet supported in v4');
+	public function resolveTemplatePathAndFilenameChecksDifferentPathPatternsAndReturnsTheFirstPathWhichExists() { $this->markTestIncomplete("Not implemented in v4");
 		vfsStreamWrapper::register();
 		mkdir('vfs://MyTemplates');
-		file_put_contents('vfs://MyTemplates/MyCoolAction.html', '');
+		file_put_contents('vfs://MyTemplates/MyCoolAction.html', 'contentsOfMyCoolAction');
 
 		$paths = array(
 			 'vfs://NonExistantDir/UnknowFile.html',
@@ -334,7 +207,7 @@ class Tx_Fluid_View_TemplateViewTest extends Tx_Extbase_BaseTestCase {
 		$templateView->setPartialRootPath('MyPartials');
 		$templateView->setLayoutRootPath('MyLayouts');
 
-		$this->assertSame('vfs://MyTemplates/MyCoolAction.html', $templateView->_call('resolveTemplatePathAndFilename', 'myCoolAction'));
+		$this->assertSame('contentsOfMyCoolAction', $templateView->_call('getTemplateSource', 'myCoolAction'));
 
 	}
 
@@ -342,11 +215,15 @@ class Tx_Fluid_View_TemplateViewTest extends Tx_Extbase_BaseTestCase {
 	 * @test
 	 * @author Robert Lemke <robert@typo3.org>
 	 */
-	public function resolveTemplatePathAndFilenameReturnsTheExplicitlyConfiguredTemplatePathAndFilename() {
+	public function resolveTemplatePathAndFilenameReturnsTheExplicitlyConfiguredTemplatePathAndFilename() { $this->markTestIncomplete("Not implemented in v4");
+		vfsStreamWrapper::register();
+		mkdir('vfs://MyTemplates');
+		file_put_contents('vfs://MyTemplates/MyCoolAction.html', 'contentsOfMyCoolAction');
+
 		$templateView = $this->getAccessibleMock('Tx_Fluid_View_TemplateView', array('dummy'), array(), '', FALSE);
-		$templateView->_set('templatePathAndFilename', 'Foo/Bar/Baz.html');
+		$templateView->_set('templatePathAndFilename', 'vfs://MyTemplates/MyCoolAction.html');
 
-		$this->assertSame('Foo/Bar/Baz.html', $templateView->_call('resolveTemplatePathAndFilename'));
+		$this->assertSame('contentsOfMyCoolAction', $templateView->_call('getTemplateSource'));
   	}
 }
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
index 63e5c67ea27e347387c16ee3127c41fe9dbb60da..3f443127afc941f1bb30bb620a050a6d827c5703 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/AliasViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for AliasViewHelper
  *
- * @version $Id: AliasViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_AliasViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -45,6 +44,7 @@ class Tx_Fluid_ViewHelpers_AliasViewHelperTest extends Tx_Fluid_ViewHelpers_View
 
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
 		$viewHelper->setViewHelperNode($mockViewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('someAlias' => 'someValue'));
 	}
 
@@ -65,6 +65,7 @@ class Tx_Fluid_ViewHelpers_AliasViewHelperTest extends Tx_Fluid_ViewHelpers_View
 
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
 		$viewHelper->setViewHelperNode($mockViewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('someAlias' => 'someValue', 'someOtherAlias' => 'someOtherValue'));
 	}
 
@@ -83,6 +84,7 @@ class Tx_Fluid_ViewHelpers_AliasViewHelperTest extends Tx_Fluid_ViewHelpers_View
 
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
 		$viewHelper->setViewHelperNode($mockViewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 
 		$this->assertEquals('foo', $viewHelper->render(array()));
 	}
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
index 931f38179883b85e6e381142e0bc05227172ce9b..abb9699a27c5cdcaef8ab8974ebc1e10b7f9061d 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
@@ -22,7 +22,6 @@
 
 require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
- * @version $Id: BaseViewHelperTest.php 3954 2010-03-16 08:36:26Z sebastian $
  */
 class Tx_Fluid_ViewHelpers_BaseViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
 	/**
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d9ac7b92d09d910e9c72dde7dfc600102fdc7533
--- /dev/null
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CountViewHelperTest.php
@@ -0,0 +1,96 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU Lesser General Public License as published by the *
+ * Free Software Foundation, either version 3 of the License, or (at your *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
+ * General Public License for more details.                               *
+ *                                                                        *
+ * You should have received a copy of the GNU Lesser General Public       *
+ * License along with the script.                                         *
+ * If not, see http://www.gnu.org/licenses/lgpl.html                      *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
+
+/**
+ * Testcase for CountViewHelper
+ *
+ * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
+ */
+class Tx_Fluid_ViewHelpers_CountViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
+
+	/**
+	 * var Tx_Fluid_ViewHelpers_CountViewHelper
+	 */
+	protected $viewHelper;
+
+	public function setUp() {
+		parent::setUp();
+		$this->viewHelper = new Tx_Fluid_ViewHelpers_CountViewHelper();
+		$this->injectDependenciesIntoViewHelper($this->viewHelper);
+		$this->viewHelper->initializeArguments();
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderReturnsNumberOfElementsInAnArray() {
+		$expectedResult = 3;
+		$actualResult = $this->viewHelper->render(array('foo', 'bar', 'Baz'));
+		$this->assertSame($expectedResult, $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderReturnsNumberOfElementsInAnArrayObject() {
+		$expectedResult = 2;
+		$actualResult = $this->viewHelper->render(new ArrayObject(array('foo', 'bar')));
+		$this->assertSame($expectedResult, $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderReturnsZeroIfGivenArrayIsEmpty() {
+		$expectedResult = 0;
+		$actualResult = $this->viewHelper->render(array());
+		$this->assertSame($expectedResult, $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderReturnsZeroIfGivenArrayIsNull() {
+		$expectedResult = 0;
+		$actualResult = $this->viewHelper->render(NULL);
+		$this->assertSame($expectedResult, $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @expectedException Tx_Fluid_Core_ViewHelper_Exception
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderThrowsExceptionIfGivenSubjectIsNotCountable() {
+		$object = new stdClass();
+		$this->viewHelper->render($object);
+	}
+
+}
+
+?>
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
index 503464293078d7e7f00bd3e56d4452c3f71ea2c1..ce5e85bab9caf60b01de61ff8c77b8b62e440b1d 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/CycleViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for CycleViewHelper
  *
- * @version $Id: CycleViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_CycleViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
index e420985f317212b09d6444e0e483f0b40b4a37ee..71f5e7e100dbba417a07c6fb977a2836bcdf0542 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ElseViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for ElseViewHelper
  *
- * @version $Id: ElseViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_ElseViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php
index 8d9dedb3ed9e91b2bc41f4b0c3acafd6e04926a9..069f1dad0ee2ef6c4a7e2f1a6aaa4504ad38e1e4 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php
@@ -23,9 +23,6 @@
 /**
  * [Enter description here]
  *
- * @version $Id: ConstraintSyntaxTreeNode.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage ViewHelpers\Fixtures
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode {
@@ -35,7 +32,7 @@ class Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode extends Tx_Fluid_Co
 		$this->variableContainer = $variableContainer;
 	}
 
-	public function evaluateChildNodes() {
+	public function evaluateChildNodes(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {
 		$identifiers = $this->variableContainer->getAllIdentifiers();
 		$callElement = array();
 		foreach ($identifiers as $identifier) {
@@ -44,7 +41,7 @@ class Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode extends Tx_Fluid_Co
 		$this->callProtocol[] = $callElement;
 	}
 
-	public function evaluate() {}
+	public function evaluate(Tx_Fluid_Core_Rendering_RenderingContextInterface $renderingContext) {}
 }
 
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php
index 3dc5e28feaeb981ca60009ac02ae7b7c09649aa2..b5daba0b2ef91a3579e0ebd4c640ca682da7de48 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ForViewHelperTest.php
@@ -26,7 +26,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for ForViewHelper
  *
- * @version $Id: ForViewHelperTest.php 3751 2010-01-22 15:56:47Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -44,6 +43,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array(0,1,2,3), 'innerVariable');
 
 		$expectedCallProtocol = array(
@@ -67,6 +67,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('key1' => 'value1', 'key2' => 'value2'), 'innerVariable', 'someKey');
 
 		$expectedCallProtocol = array(
@@ -119,6 +120,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
 		$viewHelper->setViewHelperNode($mockViewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('foo' => 'bar', 'FLOW3' => 'Fluid'), 'innerVariable');
 	}
 
@@ -142,6 +144,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$this->templateVariableContainer->expects($this->at(7))->method('remove')->with('someKey');
 
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->setViewHelperNode($mockViewHelperNode);
 		$viewHelper->render(array('foo' => 'bar', 'FLOW3' => 'Fluid'), 'innerVariable', 'someKey');
 	}
@@ -158,6 +161,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array(0,1,2,3), 'innerVariable', '', TRUE);
 
 		$expectedCallProtocol = array(
@@ -181,6 +185,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('key1' => 'value1', 'key2' => 'value2'), 'innerVariable', 'someKey', TRUE);
 
 		$expectedCallProtocol = array(
@@ -208,6 +213,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('foo', 'bar', 'baz'), 'innerVariable', 'someKey');
 
 		$expectedCallProtocol = array(
@@ -239,6 +245,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->render(array('foo', 'bar', 'baz'), 'innerVariable', 'someKey', TRUE);
 
 		$expectedCallProtocol = array(
@@ -283,6 +290,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$traversableObject = new ArrayObject(array('key1' => 'value1', 'key2' => 'value2'));
 		$viewHelper->render($traversableObject, 'innerVariable');
 
@@ -305,6 +313,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$iteratorObject = new ArrayIterator(array('key1' => 'value1', 'key2' => 'value2'));
 		$viewHelper->render($iteratorObject, 'innerVariable', 'someKey');
 
@@ -333,6 +342,7 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$viewHelperNode = new Tx_Fluid_ViewHelpers_Fixtures_ConstraintSyntaxTreeNode($variableContainer);
 		$viewHelper->setTemplateVariableContainer($variableContainer);
 		$viewHelper->setViewHelperNode($viewHelperNode);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$splObjectStorageObject = new SplObjectStorage();
 		$object1 = new stdClass();
 		$splObjectStorageObject->attach($object1);
@@ -359,6 +369,34 @@ class Tx_Fluid_ViewHelpers_ForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHe
 		$this->assertSame($expectedCallProtocol, $viewHelperNode->callProtocol, 'The call protocol differs -> The for loop does not work as it should!');
 	}
 
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function iterationDataIsAddedToTemplateVariableContainerIfIterationArgumentIsSet() {
+		$viewHelper = new Tx_Fluid_ViewHelpers_ForViewHelper();
+
+		$mockViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('evaluateChildNodes'), array(), '', FALSE);
+		$mockViewHelperNode->expects($this->any())->method('evaluateChildNodes')->will($this->returnValue('foo'));
+
+		$this->templateVariableContainer->expects($this->at(0))->method('add')->with('innerVariable', 'bar');
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('iteration', array('index' => 0, 'cycle' => 1, 'total' => 3, 'isFirst' => TRUE, 'isLast' => FALSE, 'isEven' => FALSE, 'isOdd' => TRUE));
+		$this->templateVariableContainer->expects($this->at(2))->method('remove')->with('innerVariable');
+		$this->templateVariableContainer->expects($this->at(3))->method('remove')->with('iteration');
+		$this->templateVariableContainer->expects($this->at(4))->method('add')->with('innerVariable', 'Fluid');
+		$this->templateVariableContainer->expects($this->at(5))->method('add')->with('iteration', array('index' => 1, 'cycle' => 2, 'total' => 3, 'isFirst' => FALSE, 'isLast' => FALSE, 'isEven' => TRUE, 'isOdd' => FALSE));
+		$this->templateVariableContainer->expects($this->at(6))->method('remove')->with('innerVariable');
+		$this->templateVariableContainer->expects($this->at(7))->method('remove')->with('iteration');
+		$this->templateVariableContainer->expects($this->at(8))->method('add')->with('innerVariable', 'rocks');
+		$this->templateVariableContainer->expects($this->at(9))->method('add')->with('iteration', array('index' => 2, 'cycle' => 3, 'total' => 3, 'isFirst' => FALSE, 'isLast' => TRUE, 'isEven' => FALSE, 'isOdd' => TRUE));
+		$this->templateVariableContainer->expects($this->at(10))->method('remove')->with('innerVariable');
+		$this->templateVariableContainer->expects($this->at(11))->method('remove')->with('iteration');
+
+		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
+		$viewHelper->setRenderingContext($this->renderingContext);
+		$viewHelper->setViewHelperNode($mockViewHelperNode);
+		$viewHelper->render(array('foo' => 'bar', 'FLOW3' => 'Fluid', 'TYPO3' => 'rocks'), 'innerVariable', '', FALSE, 'iteration');
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
index 6f85241411004788667369199fedde024baede3a..a162c22a7f6c3aa040fb238619bb8e27486fde29 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the Abstract Form view helper
  *
- * @version $Id: AbstractFormFieldViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -68,19 +67,19 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	public function getNameBuildsNameFromFieldNamePrefixFormNameAndPropertyIfInObjectAccessorMode() {
+	public function getNameBuildsNameFromFieldNamePrefixFormObjectNameAndPropertyIfInObjectAccessorMode() {
 		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formViewHelper);
 
 		$formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue('myFormName'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue('myObjectName'));
 		$this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
 		$this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
 			// TODO mock arguments
 		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla'));
 		$formViewHelper->_set('arguments', $arguments);
-		$expected = 'formPrefix[myFormName][bla]';
+		$expected = 'formPrefix[myObjectName][bla]';
 		$actual = $formViewHelper->_call('getName');
 		$this->assertSame($expected, $actual);
 	}
@@ -90,19 +89,19 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	public function getNameBuildsNameFromFieldNamePrefixFormNameAndHierarchicalPropertyIfInObjectAccessorMode() {
+	public function getNameBuildsNameFromFieldNamePrefixFormObjectNameAndHierarchicalPropertyIfInObjectAccessorMode() {
 		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formViewHelper);
 
 		$formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue('myFormName'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue('myObjectName'));
 		$this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
 		$this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
 			// TODO mock arguments
 		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => 'fieldName', 'value' => 'fieldValue', 'property' => 'bla.blubb'));
 		$formViewHelper->_set('arguments', $arguments);
-		$expected = 'formPrefix[myFormName][bla][blubb]';
+		$expected = 'formPrefix[myObjectName][bla][blubb]';
 		$actual = $formViewHelper->_call('getName');
 		$this->assertSame($expected, $actual);
 	}
@@ -111,12 +110,12 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 	 * @test
 	 * @author Bastian Waidelich <bastian@typo3.org>
 	 */
-	public function getNameBuildsNameFromFieldNamePrefixAndPropertyIfInObjectAccessorModeAndNoFormNameIsSpecified() {
+	public function getNameBuildsNameFromFieldNamePrefixAndPropertyIfInObjectAccessorModeAndNoFormObjectNameIsSpecified() {
 		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('isObjectAccessorMode'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formViewHelper);
 
 		$formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE));
-		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue(NULL));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue(NULL));
 		$this->viewHelperVariableContainer->expects($this->at(1))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue(TRUE));
 		$this->viewHelperVariableContainer->expects($this->at(2))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix')->will($this->returnValue('formPrefix'));
 
@@ -222,7 +221,7 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('dummy'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formViewHelper);
 
-		$this->viewHelperVariableContainer->expects($this->once())->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->once())->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue(TRUE));
 
 		$formViewHelper->_set('arguments', new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => NULL, 'value' => NULL, 'property' => 'bla')));
 		$this->assertTrue($formViewHelper->_call('isObjectAccessorMode'));
@@ -242,7 +241,7 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 		$mockArguments = $this->getMock('Tx_Fluid_Core_ViewHelper_Arguments', array(), array(), '', FALSE);
 		$mockArguments->expects($this->once())->method('offsetGet')->with('property')->will($this->returnValue('bar'));
 		$formViewHelper->_set('arguments', $mockArguments);
-		$this->viewHelperVariableContainer->expects($this->any())->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue('foo'));
+		$this->viewHelperVariableContainer->expects($this->any())->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue('foo'));
 
 		$mockArgumentError = $this->getMock('Tx_Extbase_MVC_Controller_ArgumentError', array(), array('foo'));
 		$mockArgumentError->expects($this->once())->method('getPropertyName')->will($this->returnValue('foo'));
@@ -404,15 +403,15 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 			return new ' . $className . ';
 		');
 		$property = 'value.something';
-		$formName = 'myForm';
-		$expectedProperty = 'myForm[value]';
+		$objectName = 'myObject';
+		$expectedProperty = 'myObject[value]';
 
 		$formFieldViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('renderHiddenIdentityField'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formFieldViewHelper);
 		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array('property' => $property));
 		$formFieldViewHelper->_set('arguments', $arguments);
 		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject')->will($this->returnValue($mockFormObject));
-		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue($formName));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue($objectName));
 
 		$formFieldViewHelper->expects($this->once())->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty);
 
@@ -437,22 +436,109 @@ class Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelperTest extends Tx_Fluid
 			return new ' . $className . ';
 		');
 		$property = 'value.value.something';
-		$formName = 'myForm';
-		$expectedProperty1 = 'myForm[value]';
-		$expectedProperty2 = 'myForm[value][value]';
+		$objectName = 'myObject';
+		$expectedProperty1 = 'myObject[value]';
+		$expectedProperty2 = 'myObject[value][value]';
 
 		$formFieldViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('renderHiddenIdentityField'), array(), '', FALSE);
 		$this->injectDependenciesIntoViewHelper($formFieldViewHelper);
 		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array('property' => $property));
 		$formFieldViewHelper->_set('arguments', $arguments);
 		$this->viewHelperVariableContainer->expects($this->at(0))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject')->will($this->returnValue($mockFormObject));
-		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formName')->will($this->returnValue($formName));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName')->will($this->returnValue($objectName));
 
 		$formFieldViewHelper->expects($this->at(0))->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty1);
 		$formFieldViewHelper->expects($this->at(1))->method('renderHiddenIdentityField')->with($mockFormObject, $expectedProperty2);
 
 		$formFieldViewHelper->_call('addAdditionalIdentityPropertiesIfNeeded');
 	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderHiddenFieldForEmptyValueRendersHiddenFieldIfItHasNotBeenRenderedBefore() {
+		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($formViewHelper);
+
+		$formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
+
+		$expected = '<input type="hidden" name="SomeFieldName" value="" />';
+		$actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
+		$this->assertEquals($expected, $actual);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderHiddenFieldForEmptyValueAddsHiddenFieldNameToVariableContainerIfItHasBeenRendered() {
+		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($formViewHelper);
+
+		$formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('NewFieldName'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array('OldFieldName')));
+		$this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields', array('OldFieldName', 'NewFieldName'));
+
+		$formViewHelper->_call('renderHiddenFieldForEmptyValue');
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderHiddenFieldForEmptyValueDoesNotRenderHiddenFieldIfItHasBeenRenderedBefore() {
+		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($formViewHelper);
+
+		$formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array('SomeFieldName')));
+		$this->viewHelperVariableContainer->expects($this->never())->method('addOrUpdate');
+
+		$expected = '';
+		$actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
+		$this->assertEquals($expected, $actual);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderHiddenFieldForEmptyValueRemovesEmptySquareBracketsFromHiddenFieldName() {
+		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($formViewHelper);
+
+		$formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName[WithBrackets][]'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
+		$this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields', array('SomeFieldName[WithBrackets]'));
+
+		$expected = '<input type="hidden" name="SomeFieldName[WithBrackets]" value="" />';
+		$actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
+		$this->assertEquals($expected, $actual);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderHiddenFieldForEmptyValueDoesNotRemoveNonEmptySquareBracketsFromHiddenFieldName() {
+		$formViewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper', array('getName'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($formViewHelper);
+
+		$formViewHelper->expects($this->any())->method('getName')->will($this->returnValue('SomeFieldName[WithBrackets][foo]'));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields')->will($this->returnValue(array()));
+		$this->viewHelperVariableContainer->expects($this->at(2))->method('addOrUpdate')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'renderedHiddenFields', array('SomeFieldName[WithBrackets][foo]'));
+
+		$expected = '<input type="hidden" name="SomeFieldName[WithBrackets][foo]" value="" />';
+		$actual = $formViewHelper->_call('renderHiddenFieldForEmptyValue');
+		$this->assertEquals($expected, $actual);
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
index 223168960e2f547400f62cb6cfe5c033df088986..663200736e439734d3e03cb9f92e35ff08c30e1e 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the Abstract Form view helper
  *
- * @version $Id: AbstractFormViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
index 67f52bbe338aec26cd64fff3b46279fb03d7721a..29498433b1f98db84644774f97ee36cd338acd1d 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Checkbox" Form view helper
  *
- * @version $Id: CheckboxViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_CheckboxViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
index 478eee01f67ab9dc49e13b17fbc525b356957397..9f7f1392dd28b51376b8a3d2e48d57c9d4df4a21 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php
@@ -23,9 +23,6 @@
 /**
  * [Enter description here]
  *
- * @version $Id: EmptySyntaxTreeNode.php 3751 2010-01-22 15:56:47Z k-fish $
- * @package Fluid
- * @subpackage ViewHelpers\Fixtures
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Fixtures_EmptySyntaxTreeNode extends Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php
index 632f46312cbcadb3d65089cba9f8a710aa384568..4b90a4eb0b32f4f63fd65fac8e5158795ddaf056 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php
@@ -23,9 +23,6 @@
 /**
  * Example domain class which can be used to test different view helpers, e.g. the "select" view helper.
  *
- * @version $Id: Fixture_UserDomainClass.php 3350 2009-10-27 12:01:08Z k-fish $
- * @package Fluid
- * @subpackage ViewHelpers\Fixtures
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
index b0544fe823dc31596d125d9488f2323fbaf158fd..2513ced17679a32bbfac6a3c97d48c5e1ffb6ff4 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Hidden" Form view helper
  *
- * @version $Id: HiddenViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_HiddenViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
index 88e782f5d6375e90507095dd1283358fff9f5695..22147a845133fc272b9cbcd79beb56d2ad15197b 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Radio" Form view helper
  *
- * @version $Id: RadioViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_RadioViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
index 6608e7474d67cbc8d0a47a98f286e411c61fa2d3..5fc7be1b063468f1930008b380d0b5a41fb9a7a6 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
@@ -27,7 +27,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Select" Form view helper
  *
- * @version $Id: SelectViewHelperTest.php 3930 2010-03-11 20:07:52Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -377,6 +376,57 @@ class Tx_Fluid_ViewHelpers_Form_SelectViewHelperTest extends Tx_Fluid_ViewHelper
 		$this->viewHelper->expects($this->once())->method('setErrorClassAttribute');
 		$this->viewHelper->render();
 	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function allOptionsAreSelectedIfSelectAllIsTrue() {
+		$mockTagBuilder = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+		$mockTagBuilder->expects($this->once())->method('setContent')->with('<option value="value1" selected="selected">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10) . '<option value="value3" selected="selected">label3</option>' . chr(10));
+		$this->viewHelper->injectTagBuilder($mockTagBuilder);
+
+		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array(
+			'options' => array(
+				'value1' => 'label1',
+				'value2' => 'label2',
+				'value3' => 'label3'
+			),
+			'name' => 'myName',
+			'multiple' => 'multiple',
+			'selectAllByDefault' => TRUE
+		));
+		$this->viewHelper->setArguments($arguments);
+
+		$this->viewHelper->initialize();
+		$this->viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function selectAllHasNoEffectIfValueIsSet() {
+		$mockTagBuilder = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder', array('addAttribute', 'setContent', 'render'), array(), '', FALSE);
+		$mockTagBuilder->expects($this->once())->method('setContent')->with('<option value="value1" selected="selected">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10) . '<option value="value3">label3</option>' . chr(10));
+		$this->viewHelper->injectTagBuilder($mockTagBuilder);
+
+		$arguments = new Tx_Fluid_Core_ViewHelper_Arguments(array(
+			'options' => array(
+				'value1' => 'label1',
+				'value2' => 'label2',
+				'value3' => 'label3'
+			),
+			'value' => array('value2', 'value1'),
+			'name' => 'myName',
+			'multiple' => 'multiple',
+			'selectAllByDefault' => TRUE
+		));
+		$this->viewHelper->setArguments($arguments);
+
+		$this->viewHelper->initialize();
+		$this->viewHelper->render();
+	}
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
index 430df9cda68a7b156ff1aa26f206015f478a59ff..54af57d4e074abda10482ab7e4ec5369f8333503 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Submit" Form view helper
  *
- * @version $Id: SubmitViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_SubmitViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
index b0f97b6b4ab265139eae4b09d9cc1435f2179a74..42a1ffdf1813f9571523414a94083a576e644c41 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php
@@ -27,7 +27,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Textarea" Form view helper
  *
- * @version $Id: TextareaViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_TextareaViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php
index d7ba3e09791c305b3f3351b9874546570f79ebb7..608f2b693d1bb7d584f0d50ddbd84a4e6c91b3da 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php
@@ -27,7 +27,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Textbox" Form view helper
  *
- * @version $Id: TextboxViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_TextboxViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
index a9df27337924e32bc27fb17ca2269962ad2d7bf8..188c5ded11a471559c5ed2092fd18abf24c09de6 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
@@ -27,7 +27,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Test for the "Upload" Form view helper
  *
- * @version $Id: UploadViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Form_UploadViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..87a6eb1c6e2babb29b026f286175b15bacb06c30
--- /dev/null
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
@@ -0,0 +1,262 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU General Public License as published by the Free   *
+ * Software Foundation, either version 3 of the License, or (at your      *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
+ * Public License for more details.                                       *
+ *                                                                        *
+ * You should have received a copy of the GNU General Public License      *
+ * along with the script.                                                 *
+ * If not, see http://www.gnu.org/licenses/gpl.html                       *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ */
+
+require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
+
+/**
+ * @version $Id:$
+ */
+class Tx_Fluid_ViewHelpers_FormViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderAddsObjectToViewHelperVariableContainer() {
+		$formObject = new stdClass();
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectNameToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectNameFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('object' => $formObject)));
+		$this->viewHelperVariableContainer->expects($this->at(0))->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject', $formObject);
+		$this->viewHelperVariableContainer->expects($this->at(1))->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'additionalIdentityProperties', array());
+		$this->viewHelperVariableContainer->expects($this->at(2))->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject');
+		$this->viewHelperVariableContainer->expects($this->at(3))->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'additionalIdentityProperties');
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderAddsObjectNameToTemplateVariableContainer() {
+		$objectName = 'someObjectName';
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => $objectName)));
+
+		$this->viewHelperVariableContainer->expects($this->once())->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName', $objectName);
+		$this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function formObjectNameArgumentOverrulesNameArgument() {
+		$objectName = 'someObjectName';
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormObjectToViewHelperVariableContainer', 'addFieldNamePrefixToViewHelperVariableContainer', 'removeFormObjectFromViewHelperVariableContainer', 'removeFieldNamePrefixFromViewHelperVariableContainer', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('name' => 'formName', 'objectName' => $objectName)));
+
+		$this->viewHelperVariableContainer->expects($this->once())->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName', $objectName);
+		$this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObjectName');
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Christopher Hlubek <hlubek@networkteam.com>
+	 */
+	public function renderCallsRenderHiddenReferrerFields() {
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderHiddenReferrerFields'), array(), '', FALSE);
+		$viewHelper->expects($this->once())->method('renderHiddenReferrerFields');
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderCallsRenderHiddenIdentityField() {
+		$object = new stdClass();
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderHiddenIdentityField'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+		$viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('object' => $object, 'name' => 'MyName')));
+		$viewHelper->expects($this->once())->method('renderHiddenIdentityField')->with($object, 'MyName');
+
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderCallsRenderAdditionalIdentityFields() {
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderRequestHashField', 'renderAdditionalIdentityFields'), array(), '', FALSE);
+		$viewHelper->expects($this->once())->method('renderAdditionalIdentityFields');
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderWrapsHiddenFieldsWithDivForXhtmlCompatibility() {
+		$viewHelper = $this->getMock($this->buildAccessibleProxy('Tx_Fluid_ViewHelpers_FormViewHelper'), array('renderChildren', 'renderHiddenIdentityField', 'renderAdditionalIdentityFields', 'renderHiddenReferrerFields', 'renderRequestHashField'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+		$viewHelper->expects($this->once())->method('renderHiddenIdentityField')->will($this->returnValue('hiddenIdentityField'));
+		$viewHelper->expects($this->once())->method('renderAdditionalIdentityFields')->will($this->returnValue('additionalIdentityFields'));
+		$viewHelper->expects($this->once())->method('renderHiddenReferrerFields')->will($this->returnValue('hiddenReferrerFields'));
+		$viewHelper->expects($this->once())->method('renderRequestHashField')->will($this->returnValue('requestHashField'));
+		$viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('formContent'));
+
+		$expectedResult = chr(10) . '<div style="display: none">' . 'hiddenIdentityFieldadditionalIdentityFieldshiddenReferrerFieldsrequestHashField' . chr(10) . '</div>' . chr(10) . 'formContent';
+		$this->tagBuilder->expects($this->once())->method('setContent')->with($expectedResult);
+
+		$viewHelper->render();
+	}
+
+
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 */
+	public function renderAdditionalIdentityFieldsFetchesTheFieldsFromViewHelperVariableContainerAndBuildsHiddenFieldsForThem() {
+		$identityProperties = array(
+			'object1[object2]' => '<input type="hidden" name="object1[object2][__identity]" value="42" />',
+			'object1[object2][subobject]' => '<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />'
+		);
+		$this->viewHelperVariableContainer->expects($this->once())->method('exists')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'additionalIdentityProperties')->will($this->returnValue(TRUE));
+		$this->viewHelperVariableContainer->expects($this->once())->method('get')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'additionalIdentityProperties')->will($this->returnValue($identityProperties));
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$expected = chr(10) . '<input type="hidden" name="object1[object2][__identity]" value="42" />' . chr(10) .
+			'<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />';
+		$actual = $viewHelper->_call('renderAdditionalIdentityFields');
+		$this->assertEquals($expected, $actual);
+	}
+
+	/**
+	 * @test
+	 * @author Christopher Hlubek <hlubek@networkteam.com>
+	 */
+	public function renderHiddenReferrerFieldsAddCurrentControllerAndActionAsHiddenFields() {
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('dummy'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$this->request->expects($this->atLeastOnce())->method('getControllerExtensionName')->will($this->returnValue('extensionName'));
+		$this->request->expects($this->never())->method('getControllerSubextensionName');
+		$this->request->expects($this->atLeastOnce())->method('getControllerName')->will($this->returnValue('controllerName'));
+		$this->request->expects($this->atLeastOnce())->method('getControllerActionName')->will($this->returnValue('controllerActionName'));
+
+		$hiddenFields = $viewHelper->_call('renderHiddenReferrerFields');
+		$expectedResult = chr(10) . '<input type="hidden" name="__referrer[extensionName]" value="extensionName" />' . chr(10) .
+			'<input type="hidden" name="__referrer[controllerName]" value="controllerName" />' . chr(10) .
+			'<input type="hidden" name="__referrer[actionName]" value="controllerActionName" />' . chr(10);
+		$this->assertEquals($expectedResult, $hiddenFields);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderAddsSpecifiedPrefixToTemplateVariableContainer() {
+		$prefix = 'somePrefix';
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$viewHelper->setArguments(new Tx_Fluid_Core_ViewHelper_Arguments(array('fieldNamePrefix' => $prefix)));
+
+		$this->viewHelperVariableContainer->expects($this->once())->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix', $prefix);
+		$this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix');
+		$viewHelper->render();
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderAddsDefaultFieldNamePrefixToTemplateVariableContainerIfNoPrefixIsSpecified() {
+		$expectedPrefix = 'tx_someextension_someplugin';
+		$this->request->expects($this->once())->method('getControllerExtensionName')->will($this->returnValue('SomeExtension'));
+		$this->request->expects($this->once())->method('getPluginName')->will($this->returnValue('SomePlugin'));
+
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('renderChildren', 'renderHiddenIdentityField', 'renderHiddenReferrerFields', 'renderRequestHashField', 'addFormFieldNamesToViewHelperVariableContainer', 'removeFormFieldNamesFromViewHelperVariableContainer'), array(), '', FALSE);
+		$this->injectDependenciesIntoViewHelper($viewHelper);
+
+		$this->viewHelperVariableContainer->expects($this->once())->method('add')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix', $expectedPrefix);
+		$this->viewHelperVariableContainer->expects($this->once())->method('remove')->with('Tx_Fluid_ViewHelpers_FormViewHelper', 'fieldNamePrefix');
+		$viewHelper->render();
+	}
+
+	/**
+	 * Data Provider for postProcessUriArgumentsForRequestHashWorks
+	 */
+	public function argumentsForPostProcessUriArgumentsForRequestHash() {
+		return array(
+			// simple values
+			array(
+				array(
+					'bla' => 'X',
+					'blubb' => 'Y'
+				),
+				array(
+					'bla',
+					'blubb'
+				)
+			),
+			// Arrays
+			array(
+				array(
+					'bla' => array(
+						'test1' => 'X',
+						'test2' => 'Y'
+					),
+					'blubb' => 'Y'
+				),
+				array(
+					'bla[test1]',
+					'bla[test2]',
+					'blubb'
+				)
+			)
+		);
+	}
+	/**
+	 * @test
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
+	 * @dataProvider argumentsForPostProcessUriArgumentsForRequestHash
+	 */
+	public function postProcessUriArgumentsForRequestHashWorks($arguments, $expectedResults) {
+		$viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_FormViewHelper', array('dummy'), array(), '', FALSE);
+		$results = array();
+		$viewHelper->_callRef('postProcessUriArgumentsForRequestHash', $arguments, $results);
+		$this->assertEquals($expectedResults, $results);
+	}
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..59f1006ec7afa5eaa9279f2f33ab5034f82166a0
--- /dev/null
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
@@ -0,0 +1,85 @@
+<?php
+
+/*                                                                        *
+ * This script belongs to the FLOW3 package "Fluid".                      *
+ *                                                                        *
+ * It is free software; you can redistribute it and/or modify it under    *
+ * the terms of the GNU General Public License as published by the Free   *
+ * Software Foundation, either version 3 of the License, or (at your      *
+ * option) any later version.                                             *
+ *                                                                        *
+ * This script is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
+ * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
+ * Public License for more details.                                       *
+ *                                                                        *
+ * You should have received a copy of the GNU General Public License      *
+ * along with the script.                                                 *
+ * If not, see http://www.gnu.org/licenses/gpl.html                       *
+ *                                                                        *
+ * The TYPO3 project - inspiring people to share!                         *
+ *                                                                        */
+
+/**
+ */
+class Tx_Fluid_ViewHelpers_Format_CropViewHelperTest extends Tx_Extbase_BaseTestCase {
+
+	/**
+	 * var Tx_Fluid_ViewHelpers_Format_CropViewHelper
+	 */
+	protected $viewHelper;
+
+	/**
+	 * @var tslib_cObj
+	 */
+	protected $mockContentObject;
+
+	public function setUp() {
+		parent::setUp();
+
+		$this->mockContentObject = $this->getMock('tslib_cObj', array(), array(), '', FALSE);
+		$this->viewHelper = $this->getMock('Tx_Fluid_ViewHelpers_Format_CropViewHelper', array('renderChildren'), array($this->mockContentObject));
+		$this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Some Content'));
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function viewHelperCallsCropHtmlByDefault() {
+		$this->mockContentObject->expects($this->once())->method('cropHTML')->with('Some Content', '123|...|1')->will($this->returnValue('Cropped Content'));
+		$actualResult = $this->viewHelper->render(123);
+		$this->assertEquals('Cropped Content', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function viewHelperCallsCropHtmlByDefault2() {
+		$this->mockContentObject->expects($this->once())->method('cropHTML')->with('Some Content', '-321|custom suffix|1')->will($this->returnValue('Cropped Content'));
+		$actualResult = $this->viewHelper->render(-321, 'custom suffix');
+		$this->assertEquals('Cropped Content', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function respectWordBoundariesCanBeDisabled() {
+		$this->mockContentObject->expects($this->once())->method('cropHTML')->with('Some Content', '123|...|')->will($this->returnValue('Cropped Content'));
+		$actualResult = $this->viewHelper->render(123, '...', FALSE);
+		$this->assertEquals('Cropped Content', $actualResult);
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function respectHtmlCanBeDisabled() {
+		$this->mockContentObject->expects($this->once())->method('crop')->with('Some Content', '123|...|1')->will($this->returnValue('Cropped Content'));
+		$actualResult = $this->viewHelper->render(123, '...', TRUE, FALSE);
+		$this->assertEquals('Cropped Content', $actualResult);
+	}
+}
+?>
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
index 3d27b307c5a6c63d4d66c9dd6b12be9bfe3c6307..494b6031597b6ccc2558639d70755fd8adb010b5 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: CurrencyViewHelperTest.php 2813 2009-07-16 14:02:34Z k-fish $
  */
 class Tx_Fluid_ViewHelpers_Format_CurrencyViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
index 6d8351dbf18e29a5b82f61be7085a53fb3183e57..3efc4e040c185e225dba864e08c806dd03d16de9 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: DateViewHelperTest.php 3365 2009-10-28 15:16:33Z bwaidelich $
  */
 class Tx_Fluid_ViewHelpers_Format_DateViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
index eb044eff46cc0938667fe76025073229f2cc48dc..053a436271e4ba1868fdc7323e0f7bf86c1ccd68 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: Nl2brViewHelperTest.php 2813 2009-07-16 14:02:34Z k-fish $
  */
 class Tx_Fluid_ViewHelpers_Format_Nl2brViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
index 94f2aaac7188f67420e2c19d0f46d83c743a3df2..9a048e2f7529fa2870345f8fe61456c9f441e523 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: NumberViewHelperTest.php 2813 2009-07-16 14:02:34Z k-fish $
  */
 class Tx_Fluid_ViewHelpers_Format_NumberViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
index 6021ba52f3904804b77f27a5866281fd6998a602..3446c490ff729d4e898ebcefaba21b1e2fd109ba 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: PaddingViewHelperTest.php 3190 2009-09-16 16:48:39Z bwaidelich $
  */
 class Tx_Fluid_ViewHelpers_Format_PaddingViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
index a3d33b38d317cff3e9490135d16455cc5e6533cc..9d5b39847418b8a5877f0cd890c879069b7e1fd0 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php
@@ -21,7 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: PrintfViewHelperTest.php 2813 2009-07-16 14:02:34Z k-fish $
  */
 class Tx_Fluid_ViewHelpers_Format_PrintfViewHelperTest extends Tx_Extbase_BaseTestCase {
 
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
index a273ccd9fb74618916312ce7d8669b9aad9e5645..62a41ac0fa501431c83953fc1628242ae1349092 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php
@@ -26,7 +26,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for CycleViewHelper
  *
- * @version $Id: GroupedForViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_GroupedForViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -155,6 +154,72 @@ class Tx_Fluid_ViewHelpers_GroupedForViewHelperTest extends Tx_Fluid_ViewHelpers
 		$this->viewHelper->render($products, 'products', 'license', 'myGroupKey');
 	}
 
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderGroupsMultidimensionalArrayByObjectKey() {
+		$customer1 = new stdClass();
+		$customer1->name = 'Anton Abel';
+
+		$customer2 = new stdClass();
+		$customer2->name = 'Balthasar Bux';
+
+		$invoice1 = array('date' => new DateTime('1980-12-13'), 'customer' => $customer1);
+		$invoice2 = array('date' => new DateTime('2010-07-01'), 'customer' => $customer1);
+		$invoice3 = array('date' => new DateTime('2010-07-04'), 'customer' => $customer2);
+
+		$invoices = array('invoice1' => $invoice1, 'invoice2' => $invoice2, 'invoice3' => $invoice3);
+
+		$this->templateVariableContainer->expects($this->at(0))->method('add')->with('myGroupKey', $customer1);
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('invoices', array('invoice1' => $invoice1, 'invoice2' => $invoice2));
+		$this->templateVariableContainer->expects($this->at(2))->method('remove')->with('myGroupKey');
+		$this->templateVariableContainer->expects($this->at(3))->method('remove')->with('invoices');
+		$this->templateVariableContainer->expects($this->at(4))->method('add')->with('myGroupKey', $customer2);
+		$this->templateVariableContainer->expects($this->at(5))->method('add')->with('invoices', array('invoice3' => $invoice3));
+		$this->templateVariableContainer->expects($this->at(6))->method('remove')->with('myGroupKey');
+		$this->templateVariableContainer->expects($this->at(7))->method('remove')->with('invoices');
+
+		$this->viewHelper->render($invoices, 'invoices', 'customer', 'myGroupKey');
+	}
+
+	/**
+	 * @test
+	 * @author Bastian Waidelich <bastian@typo3.org>
+	 */
+	public function renderGroupsMultidimensionalObjectByObjectKey() {
+		$customer1 = new stdClass();
+		$customer1->name = 'Anton Abel';
+
+		$customer2 = new stdClass();
+		$customer2->name = 'Balthasar Bux';
+
+		$invoice1 = new stdClass();
+		$invoice1->date = new DateTime('1980-12-13');
+		$invoice1->customer = $customer1;
+
+		$invoice2 = new stdClass();
+		$invoice2->date = new DateTime('2010-07-01');
+		$invoice2->customer = $customer1;
+
+		$invoice3 = new stdClass();
+		$invoice3->date = new DateTime('2010-07-04');
+		$invoice3->customer = $customer2;
+
+		$invoices = array('invoice1' => $invoice1, 'invoice2' => $invoice2, 'invoice3' => $invoice3);
+
+		$this->templateVariableContainer->expects($this->at(0))->method('add')->with('myGroupKey', $customer1);
+		$this->templateVariableContainer->expects($this->at(1))->method('add')->with('invoices', array('invoice1' => $invoice1, 'invoice2' => $invoice2));
+		$this->templateVariableContainer->expects($this->at(2))->method('remove')->with('myGroupKey');
+		$this->templateVariableContainer->expects($this->at(3))->method('remove')->with('invoices');
+		$this->templateVariableContainer->expects($this->at(4))->method('add')->with('myGroupKey', $customer2);
+		$this->templateVariableContainer->expects($this->at(5))->method('add')->with('invoices', array('invoice3' => $invoice3));
+		$this->templateVariableContainer->expects($this->at(6))->method('remove')->with('myGroupKey');
+		$this->templateVariableContainer->expects($this->at(7))->method('remove')->with('invoices');
+
+		$this->viewHelper->render($invoices, 'invoices', 'customer', 'myGroupKey');
+	}
+
 	/**
 	 * @test
 	 * @author Bastian Waidelich <bastian@typo3.org>
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
index 81c29f53d58607dd7eb0bd42716107f0e00cb0de..2e46675a978a2bc63671c57c70f99998e047b121 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/IfViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for IfViewHelper
  *
- * @version $Id: IfViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_IfViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
@@ -42,132 +41,33 @@ class Tx_Fluid_ViewHelpers_IfViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHel
 
 	public function setUp() {
 		parent::setUp();
-		$this->viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_IfViewHelper', array('renderChildren'));
+		$this->viewHelper = $this->getAccessibleMock('Tx_Fluid_ViewHelpers_IfViewHelper', array('renderThenChild', 'renderElseChild'));
 		$this->injectDependenciesIntoViewHelper($this->viewHelper);
 		$this->viewHelper->initializeArguments();
 	}
 
 	/**
 	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function viewHelperRendersChildrenIfConditionIsTrueAndNoThenViewHelperChildExists() {
-		$this->viewHelper->expects($this->at(0))->method('renderChildren')->will($this->returnValue('foo'));
+	public function viewHelperRendersThenChildIfConditionIsTrue() {
+		$this->viewHelper->expects($this->at(0))->method('renderThenChild')->will($this->returnValue('foo'));
 
 		$actualResult = $this->viewHelper->render(TRUE);
 		$this->assertEquals('foo', $actualResult);
 	}
 
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function viewHelperRendersThenViewHelperChildIfConditionIsTrueAndThenViewHelperChildExists() {
-		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
-
-		$mockThenViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-		$mockThenViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('Tx_Fluid_ViewHelpers_ThenViewHelper'));
-		$mockThenViewHelperNode->expects($this->at(1))->method('setRenderingContext')->with($mockRenderingContext);
-		$mockThenViewHelperNode->expects($this->at(2))->method('evaluate')->will($this->returnValue('ThenViewHelperResults'));
-
-		$this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
-		$this->viewHelper->setRenderingContext($mockRenderingContext);
-		$actualResult = $this->viewHelper->render(TRUE);
-		$this->assertEquals('ThenViewHelperResults', $actualResult);
-	}
-
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function renderReturnsEmptyStringIfConditionIsFalseAndNoThenViewHelperChildExists() {
-		$actualResult = $this->viewHelper->render(FALSE);
-		$this->assertEquals('', $actualResult);
-	}
 
 	/**
 	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
+	 * @author Sebastian Kurfürst <sebastian@typo3.org>
 	 */
-	public function viewHelperRendersElseViewHelperChildIfConditionIsFalseAndNoThenViewHelperChildExists() {
-		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
-
-		$mockElseViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-		$mockElseViewHelperNode->expects($this->at(0))->method('getViewHelperClassName')->will($this->returnValue('Tx_Fluid_ViewHelpers_ElseViewHelper'));
-		$mockElseViewHelperNode->expects($this->at(1))->method('setRenderingContext')->with($mockRenderingContext);
-		$mockElseViewHelperNode->expects($this->at(2))->method('evaluate')->will($this->returnValue('ElseViewHelperResults'));
-
-		$this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
-		$this->viewHelper->setRenderingContext($mockRenderingContext);
+	public function viewHelperRendersElseChildIfConditionIsFalse() {
+		$this->viewHelper->expects($this->at(0))->method('renderElseChild')->will($this->returnValue('foo'));
 
 		$actualResult = $this->viewHelper->render(FALSE);
-		$this->assertEquals('ElseViewHelperResults', $actualResult);
-	}
-
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function renderReturnsValueOfThenArgumentIfConditionIsTrue() {
-		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('then')->will($this->returnValue(TRUE));
-		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('then')->will($this->returnValue('ThenArgument'));
-
-		$actualResult = $this->viewHelper->render(TRUE);
-		$this->assertEquals('ThenArgument', $actualResult);
-	}
-
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function thenArgumentHasPriorityOverChildNodesIfConditionIsTrue() {
-		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
-
-		$mockThenViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-		$mockThenViewHelperNode->expects($this->never())->method('evaluate');
-
-		$this->viewHelper->setChildNodes(array($mockThenViewHelperNode));
-		$this->viewHelper->setRenderingContext($mockRenderingContext);
-
-		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('then')->will($this->returnValue(TRUE));
-		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('then')->will($this->returnValue('ThenArgument'));
-
-		$actualResult = $this->viewHelper->render(TRUE);
-		$this->assertEquals('ThenArgument', $actualResult);
-	}
-
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function renderReturnsValueOfElseArgumentIfConditionIsFalse() {
-		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('else')->will($this->returnValue(TRUE));
-		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('else')->will($this->returnValue('ElseArgument'));
-
-		$actualResult = $this->viewHelper->render(FALSE);
-		$this->assertEquals('ElseArgument', $actualResult);
-	}
-
-	/**
-	 * @test
-	 * @author Bastian Waidelich <bastian@typo3.org>
-	 */
-	public function elseArgumentHasPriorityOverChildNodesIfConditionIsFalse() {
-		$mockRenderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
-
-		$mockElseViewHelperNode = $this->getMock('Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode', array('getViewHelperClassName', 'evaluate', 'setRenderingContext'), array(), '', FALSE);
-		$mockElseViewHelperNode->expects($this->never())->method('evaluate');
-
-		$this->viewHelper->setChildNodes(array($mockElseViewHelperNode));
-		$this->viewHelper->setRenderingContext($mockRenderingContext);
-
-		$this->arguments->expects($this->atLeastOnce())->method('hasArgument')->with('else')->will($this->returnValue(TRUE));
-		$this->arguments->expects($this->atLeastOnce())->method('offsetGet')->with('else')->will($this->returnValue('ElseArgument'));
-
-		$actualResult = $this->viewHelper->render(FALSE);
-		$this->assertEquals('ElseArgument', $actualResult);
+		$this->assertEquals('foo', $actualResult);
 	}
-
 }
 
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
index 44399d856d2e6df5c22a8b4e0cc922943dcc57fc..f4291fa835de07867e3b591a47cb107ff4d934d1 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
@@ -16,7 +16,6 @@
 require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 
 /**
- * @version $Id: EmailViewHelperTest_testcase.php 1734 2009-11-25 21:53:57Z stucki $
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
  */
 class Tx_Fluid_ViewHelpers_Link_EmailViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
index da1f17d0007fbdacc35973b88ec3e4afc856dc0d..7021c32d94758944f9bd02560a921baad45dd31c 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
@@ -23,7 +23,6 @@
 require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 
 /**
- * @version $Id: ExternalViewHelperTest.php 3835 2010-02-22 15:15:17Z robert $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Link_ExternalViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Persistence/IdentityViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Persistence/IdentityViewHelperTest.php
index cb393ecb830b62fda662925292913159537b6756..b1bff32a82b87e0fbc594b8e7c25993968d0d7f5 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Persistence/IdentityViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Persistence/IdentityViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Testcase for IdentityViewHelper
  *
- * @version $Id$
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_Persistence_IdentityViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
index eab6b258e949f2abf367cb4c8b15f60f5243facc..a7e77028a492930513707349f36584e71b3b5762 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ThenViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/ViewHelperBaseTestcase.php');
 /**
  * Testcase for ElseViewHelper
  *
- * @version $Id: ThenViewHelperTest.php 3350 2009-10-27 12:01:08Z k-fish $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  */
 class Tx_Fluid_ViewHelpers_ThenViewHelperTest extends Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase {
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
index ef39566f505abeb84f03043c871265b84188dedb..57d1b7fbf46df1fe27797c555f2f0fb210ab4443 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Testcase for the email uri view helper
  *
- * @version $Id: EmailViewHelperTest_testcase.php 1734 2009-11-25 21:53:57Z stucki $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
index 58b2bb44a4b5c90496126106bf46d4a44c8bfa87..f31edcaa7787fc6c1704dfd69388249e137e711b 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
@@ -25,7 +25,6 @@ require_once(dirname(__FILE__) . '/../ViewHelperBaseTestcase.php');
 /**
  * Testcase for the external uri view helper
  *
- * @version $Id: ExternalViewHelperTest.php 2914 2009-07-28 18:26:38Z bwaidelich $
  * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
  * @scope prototype
  */
diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
index 4092b61a025ae91f5c384d7c105b73895e79f65f..dae34ad3f00f5630805b7cb91287062ba7805e38 100644
--- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
+++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
@@ -21,9 +21,6 @@
  *                                                                        */
 
 /**
- * @version $Id: ViewHelperBaseTestcase.php 3643 2010-01-15 14:38:07Z robert $
- * @package Fluid
- * @subpackage ViewHelpers
  */
 abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_BaseTestCase {
 
@@ -38,12 +35,12 @@ abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Ba
 	protected $templateVariableContainer;
 
 	/**
-	 * @var \Tx_Extbase_MVC_Web_Routing_UriBuilder
+	 * @var Tx_Extbase_MVC_Web_Routing_UriBuilder
 	 */
 	protected $uriBuilder;
 
 	/**
-	 * @var \Tx_Extbase_MVC_Controller_ControllerContext
+	 * @var Tx_Extbase_MVC_Controller_ControllerContext
 	 */
 	protected $controllerContext;
 
@@ -58,10 +55,15 @@ abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Ba
 	protected $arguments;
 
 	/**
-	 * @var \Tx_Extbase_MVC_Web_Request
+	 * @var Tx_Extbase_MVC_Web_Request
 	 */
 	protected $request;
 
+	/**
+	 * @var Tx_Fluid_Core_Rendering_RenderingContext
+	 */
+	protected $renderingContext;
+
 	/**
 	 * @return void
 	 * @author Sebastian Kurfürst <sebastian@typo3.org>
@@ -88,6 +90,7 @@ abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Ba
 		$this->controllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->request));
 		$this->tagBuilder = $this->getMock('Tx_Fluid_Core_ViewHelper_TagBuilder');
 		$this->arguments = $this->getMock('Tx_Fluid_Core_ViewHelper_Arguments', array(), array(), '', FALSE);
+		$this->renderingContext = $this->getMock('Tx_Fluid_Core_Rendering_RenderingContext');
 	}
 
 	/**
@@ -99,8 +102,9 @@ abstract class Tx_Fluid_ViewHelpers_ViewHelperBaseTestcase extends Tx_Extbase_Ba
 		$viewHelper->setViewHelperVariableContainer($this->viewHelperVariableContainer);
 		$viewHelper->setTemplateVariableContainer($this->templateVariableContainer);
 		$viewHelper->setControllerContext($this->controllerContext);
+		$viewHelper->setRenderingContext($this->renderingContext);
 		$viewHelper->setArguments($this->arguments);
-		if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_TagBasedViewHelper) {
+		if ($viewHelper instanceof Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper) {
 			$viewHelper->injectTagBuilder($this->tagBuilder);
 		}
 	}
diff --git a/typo3/sysext/fluid/ext_autoload.php b/typo3/sysext/fluid/ext_autoload.php
index 1e8e9e0f2f0feeecb337d51c108c871db824dea9..62d9c71976b414a3b8422b9479a3da725679b905 100644
--- a/typo3/sysext/fluid/ext_autoload.php
+++ b/typo3/sysext/fluid/ext_autoload.php
@@ -1,161 +1,113 @@
 <?php
-// DO NOT CHANGE THIS FILE! It is automatically generated by extdeveval::buildAutoloadRegistry.
-// This file was generated on 2010-03-27 12:59
+// DO NOT CHANGE THIS FILE! It is automatically generated by Tx_Extbase_Utility_Extension::createAutoloadRegistryForExtension.
+// This file was generated on 2010-07-13 14:15
 
-$extensionPath = t3lib_extMgm::extPath('fluid');
+$extensionClassesPath = t3lib_extMgm::extPath('fluid') . 'Classes/';
 return array(
-	'tx_fluid_exception' => $extensionPath . 'Classes/Exception.php',
-	'tx_fluid_fluid' => $extensionPath . 'Classes/Fluid.php',
-	'tx_fluid_compatibility_docbookgeneratorservice' => $extensionPath . 'Classes/Compatibility/DocbookGeneratorService.php',
-	'tx_fluid_compatibility_objectmanager' => $extensionPath . 'Classes/Compatibility/ObjectManager.php',
-	'tx_fluid_compatibility_templateparserbuilder' => $extensionPath . 'Classes/Compatibility/TemplateParserBuilder.php',
-	'tx_fluid_core_exception' => $extensionPath . 'Classes/Core/Exception.php',
-	'tx_fluid_core_parser_configuration' => $extensionPath . 'Classes/Core/Parser/Configuration.php',
-	'tx_fluid_core_parser_exception' => $extensionPath . 'Classes/Core/Parser/Exception.php',
-	'tx_fluid_core_parser_interceptorinterface' => $extensionPath . 'Classes/Core/Parser/InterceptorInterface.php',
-	'tx_fluid_core_parser_parsedtemplateinterface' => $extensionPath . 'Classes/Core/Parser/ParsedTemplateInterface.php',
-	'tx_fluid_core_parser_parsingstate' => $extensionPath . 'Classes/Core/Parser/ParsingState.php',
-	'tx_fluid_core_parser_templateparser' => $extensionPath . 'Classes/Core/Parser/TemplateParser.php',
-	'tx_fluid_core_parser_interceptor_escape' => $extensionPath . 'Classes/Core/Parser/Interceptor/Escape.php',
-	'tx_fluid_core_parser_syntaxtree_abstractnode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/AbstractNode.php',
-	'tx_fluid_core_parser_syntaxtree_arraynode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/ArrayNode.php',
-	'tx_fluid_core_parser_syntaxtree_nodeinterface' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/NodeInterface.php',
-	'tx_fluid_core_parser_syntaxtree_objectaccessornode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php',
-	'tx_fluid_core_parser_syntaxtree_rootnode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/RootNode.php',
-	'tx_fluid_core_parser_syntaxtree_textnode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/TextNode.php',
-	'tx_fluid_core_parser_syntaxtree_viewhelpernode' => $extensionPath . 'Classes/Core/Parser/SyntaxTree/ViewHelperNode.php',
-	'tx_fluid_core_rendering_renderingcontext' => $extensionPath . 'Classes/Core/Rendering/RenderingContext.php',
-	'tx_fluid_core_viewhelper_abstractviewhelper' => $extensionPath . 'Classes/Core/ViewHelper/AbstractViewHelper.php',
-	'tx_fluid_core_viewhelper_argumentdefinition' => $extensionPath . 'Classes/Core/ViewHelper/ArgumentDefinition.php',
-	'tx_fluid_core_viewhelper_arguments' => $extensionPath . 'Classes/Core/ViewHelper/Arguments.php',
-	'tx_fluid_core_viewhelper_exception' => $extensionPath . 'Classes/Core/ViewHelper/Exception.php',
-	'tx_fluid_core_viewhelper_exception_invalidvariableexception' => $extensionPath . 'Classes/Core/ViewHelper/Exception/InvalidVariableException.php',
-	'tx_fluid_core_viewhelper_tagbasedviewhelper' => $extensionPath . 'Classes/Core/ViewHelper/TagBasedViewHelper.php',
-	'tx_fluid_core_viewhelper_tagbuilder' => $extensionPath . 'Classes/Core/ViewHelper/TagBuilder.php',
-	'tx_fluid_core_viewhelper_templatevariablecontainer' => $extensionPath . 'Classes/Core/ViewHelper/TemplateVariableContainer.php',
-	'tx_fluid_core_viewhelper_viewhelperinterface' => $extensionPath . 'Classes/Core/ViewHelper/ViewHelperInterface.php',
-	'tx_fluid_core_viewhelper_viewhelpervariablecontainer' => $extensionPath . 'Classes/Core/ViewHelper/ViewHelperVariableContainer.php',
-	'tx_fluid_core_viewhelper_facets_childnodeaccessinterface' => $extensionPath . 'Classes/Core/ViewHelper/Facets/ChildNodeAccessInterface.php',
-	'tx_fluid_core_viewhelper_facets_postparseinterface' => $extensionPath . 'Classes/Core/ViewHelper/Facets/PostParseInterface.php',
-	'tx_fluid_service_docbookgenerator' => $extensionPath . 'Classes/Service/DocbookGenerator.php',
-	'tx_fluid_view_exception' => $extensionPath . 'Classes/View/Exception.php',
-	'tx_fluid_view_templateview' => $extensionPath . 'Classes/View/TemplateView.php',
-	'tx_fluid_view_templateviewinterface' => $extensionPath . 'Classes/View/TemplateViewInterface.php',
-	'tx_fluid_view_exception_invalidtemplateresourceexception' => $extensionPath . 'Classes/View/Exception/InvalidTemplateResourceException.php',
-	'tx_fluid_view_exception_invalidsectionexception' => $extensionPath . 'Classes/View/Exception/InvalidSectionException.php',
-	'tx_fluid_viewhelpers_aliasviewhelper' => $extensionPath . 'Classes/ViewHelpers/AliasViewHelper.php',
-	'tx_fluid_viewhelpers_baseviewhelper' => $extensionPath . 'Classes/ViewHelpers/BaseViewHelper.php',
-	'tx_fluid_viewhelpers_cobjectviewhelper' => $extensionPath . 'Classes/ViewHelpers/CObjectViewHelper.php',
-	'tx_fluid_viewhelpers_countviewhelper' => $extensionPath . 'Classes/ViewHelpers/CountViewHelper.php',
-	'tx_fluid_viewhelpers_cycleviewhelper' => $extensionPath . 'Classes/ViewHelpers/CycleViewHelper.php',
-	'tx_fluid_viewhelpers_debugviewhelper' => $extensionPath . 'Classes/ViewHelpers/DebugViewHelper.php',
-	'tx_fluid_viewhelpers_elseviewhelper' => $extensionPath . 'Classes/ViewHelpers/ElseViewHelper.php',
-	'tx_fluid_viewhelpers_escapeviewhelper' => $extensionPath . 'Classes/ViewHelpers/EscapeViewHelper.php',
-	'tx_fluid_viewhelpers_flashmessagesviewhelper' => $extensionPath . 'Classes/ViewHelpers/FlashMessagesViewHelper.php',
-	'tx_fluid_viewhelpers_forviewhelper' => $extensionPath . 'Classes/ViewHelpers/ForViewHelper.php',
-	'tx_fluid_viewhelpers_formviewhelper' => $extensionPath . 'Classes/ViewHelpers/FormViewHelper.php',
-	'tx_fluid_viewhelpers_groupedforviewhelper' => $extensionPath . 'Classes/ViewHelpers/GroupedForViewHelper.php',
-	'tx_fluid_viewhelpers_ifviewhelper' => $extensionPath . 'Classes/ViewHelpers/IfViewHelper.php',
-	'tx_fluid_viewhelpers_imageviewhelper' => $extensionPath . 'Classes/ViewHelpers/ImageViewHelper.php',
-	'tx_fluid_viewhelpers_layoutviewhelper' => $extensionPath . 'Classes/ViewHelpers/LayoutViewHelper.php',
-	'tx_fluid_viewhelpers_renderflashmessagesviewhelper' => $extensionPath . 'Classes/ViewHelpers/RenderFlashMessagesViewHelper.php',
-	'tx_fluid_viewhelpers_renderviewhelper' => $extensionPath . 'Classes/ViewHelpers/RenderViewHelper.php',
-	'tx_fluid_viewhelpers_sectionviewhelper' => $extensionPath . 'Classes/ViewHelpers/SectionViewHelper.php',
-	'tx_fluid_viewhelpers_thenviewhelper' => $extensionPath . 'Classes/ViewHelpers/ThenViewHelper.php',
-	'tx_fluid_viewhelpers_translateviewhelper' => $extensionPath . 'Classes/ViewHelpers/TranslateViewHelper.php',
-	'tx_fluid_viewhelpers_be_abstractbackendviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/AbstractBackendViewHelper.php',
-	'tx_fluid_viewhelpers_be_containerviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/ContainerViewHelper.php',
-	'tx_fluid_viewhelpers_be_pageinfoviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/PageInfoViewHelper.php',
-	'tx_fluid_viewhelpers_be_pagepathviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/PagePathViewHelper.php',
-	'tx_fluid_viewhelpers_be_tablelistviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/TableListViewHelper.php',
-	'tx_fluid_viewhelpers_be_buttons_cshviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/Buttons/CshViewHelper.php',
-	'tx_fluid_viewhelpers_be_buttons_iconviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/Buttons/IconViewHelper.php',
-	'tx_fluid_viewhelpers_be_buttons_shortcutviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php',
-	'tx_fluid_viewhelpers_be_menus_actionmenuitemviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php',
-	'tx_fluid_viewhelpers_be_menus_actionmenuviewhelper' => $extensionPath . 'Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php',
-	'tx_fluid_viewhelpers_form_abstractformfieldviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php',
-	'tx_fluid_viewhelpers_form_abstractformviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/AbstractFormViewHelper.php',
-	'tx_fluid_viewhelpers_form_checkboxviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/CheckboxViewHelper.php',
-	'tx_fluid_viewhelpers_form_errorsviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/ErrorsViewHelper.php',
-	'tx_fluid_viewhelpers_form_hiddenviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/HiddenViewHelper.php',
-	'tx_fluid_viewhelpers_form_passwordviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/PasswordViewHelper.php',
-	'tx_fluid_viewhelpers_form_radioviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/RadioViewHelper.php',
-	'tx_fluid_viewhelpers_form_selectviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/SelectViewHelper.php',
-	'tx_fluid_viewhelpers_form_submitviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/SubmitViewHelper.php',
-	'tx_fluid_viewhelpers_form_textareaviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/TextareaViewHelper.php',
-	'tx_fluid_viewhelpers_form_textboxviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/TextboxViewHelper.php',
-	'tx_fluid_viewhelpers_form_textfieldviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/TextfieldViewHelper.php',
-	'tx_fluid_viewhelpers_form_uploadviewhelper' => $extensionPath . 'Classes/ViewHelpers/Form/UploadViewHelper.php',
-	'tx_fluid_viewhelpers_format_cropviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/CropViewHelper.php',
-	'tx_fluid_viewhelpers_format_currencyviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/CurrencyViewHelper.php',
-	'tx_fluid_viewhelpers_format_dateviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/DateViewHelper.php',
-	'tx_fluid_viewhelpers_format_htmlviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/HtmlViewHelper.php',
-	'tx_fluid_viewhelpers_format_nl2brviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/Nl2brViewHelper.php',
-	'tx_fluid_viewhelpers_format_numberviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/NumberViewHelper.php',
-	'tx_fluid_viewhelpers_format_paddingviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/PaddingViewHelper.php',
-	'tx_fluid_viewhelpers_format_printfviewhelper' => $extensionPath . 'Classes/ViewHelpers/Format/PrintfViewHelper.php',
-	'tx_fluid_viewhelpers_link_actionviewhelper' => $extensionPath . 'Classes/ViewHelpers/Link/ActionViewHelper.php',
-	'tx_fluid_viewhelpers_link_emailviewhelper' => $extensionPath . 'Classes/ViewHelpers/Link/EmailViewHelper.php',
-	'tx_fluid_viewhelpers_link_externalviewhelper' => $extensionPath . 'Classes/ViewHelpers/Link/ExternalViewHelper.php',
-	'tx_fluid_viewhelpers_link_pageviewhelper' => $extensionPath . 'Classes/ViewHelpers/Link/PageViewHelper.php',
-	'tx_fluid_viewhelpers_uri_actionviewhelper' => $extensionPath . 'Classes/ViewHelpers/Uri/ActionViewHelper.php',
-	'tx_fluid_viewhelpers_uri_emailviewhelper' => $extensionPath . 'Classes/ViewHelpers/Uri/EmailViewHelper.php',
-	'tx_fluid_viewhelpers_uri_externalviewhelper' => $extensionPath . 'Classes/ViewHelpers/Uri/ExternalViewHelper.php',
-	'tx_fluid_viewhelpers_uri_pageviewhelper' => $extensionPath . 'Classes/ViewHelpers/Uri/PageViewHelper.php',
-	'tx_fluid_viewhelpers_uri_resourceviewhelper' => $extensionPath . 'Classes/ViewHelpers/Uri/ResourceViewHelper.php',
-	'tx_fluid_core_tagbasedviewhelpertest' => $extensionPath . 'Tests/Unit/Core/TagBasedViewHelperTest.php',
-	'tx_fluid_core_tagbuildertest' => $extensionPath . 'Tests/Unit/Core/TagBuilderTest.php',
-	'tx_fluid_core_fixtures_testviewhelper' => $extensionPath . 'Tests/Unit/Core/Fixtures/TestViewHelper.php',
-	'tx_fluid_core_parser_parsingstatetest' => $extensionPath . 'Tests/Unit/Core/Parser/ParsingStateTest.php',
-	'tx_fluid_core_parser_templateparserpatterntest' => $extensionPath . 'Tests/Unit/Core/Parser/TemplateParserPatternTest.php',
-	'tx_fluid_core_parser_templateparsertest' => $extensionPath . 'Tests/Unit/Core/Parser/TemplateParserTest.php',
-	'tx_fluid_core_parser_fixtures_childnodeaccessfacetviewhelper' => $extensionPath . 'Tests/Unit/Core/Parser/Fixtures/ChildNodeAccessFacetViewHelper.php',
-	'tx_fluid_core_parser_fixtures_postparsefacetviewhelper' => $extensionPath . 'Tests/Unit/Core/Parser/Fixtures/PostParseFacetViewHelper.php',
-	'tx_fluid_core_parser_interceptor_escapetest' => $extensionPath . 'Tests/Unit/Core/Parser/Interceptor/EscapeTest.php',
-	'tx_fluid_core_parser_syntaxtree_abstractnodetest' => $extensionPath . 'Tests/Unit/Core/Parser/SyntaxTree/AbstractNodeTest.php',
-	'tx_fluid_core_parser_syntaxtree_textnodetest' => $extensionPath . 'Tests/Unit/Core/Parser/SyntaxTree/TextNodeTest.php',
-	'tx_fluid_core_parser_syntaxtree_viewhelpernodecomparatortest' => $extensionPath . 'Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeComparatorTest.php',
-	'tx_fluid_core_parser_syntaxtree_viewhelpernodetest' => $extensionPath . 'Tests/Unit/Core/Parser/SyntaxTree/ViewHelperNodeTest.php',
-	'tx_fluid_core_rendering_renderingcontexttest' => $extensionPath . 'Tests/Unit/Core/Rendering/RenderingContextTest.php',
-	'tx_fluid_core_viewhelper_abstractviewhelpertest' => $extensionPath . 'Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php',
-	'tx_fluid_core_argumentdefinitiontest' => $extensionPath . 'Tests/Unit/Core/ViewHelper/ArgumentDefinitionTest.php',
-	'tx_fluid_core_viewhelper_templatevariablecontainertest' => $extensionPath . 'Tests/Unit/Core/ViewHelper/TemplateVariableContainerTest.php',
-	'tx_fluid_core_viewhelper_viewhelpervariablecontainertest' => $extensionPath . 'Tests/Unit/Core/ViewHelper/ViewHelperVariableContainerTest.php',
-	'tx_fluid_view_templateviewtest' => $extensionPath . 'Tests/Unit/View/TemplateViewTest.php',
-	'tx_fluid_view_fixture_templateviewfixture' => $extensionPath . 'Tests/Unit/View/Fixtures/TemplateViewFixture.php',
-	'tx_fluid_view_fixture_transparentsyntaxtreenode' => $extensionPath . 'Tests/Unit/View/Fixtures/TransparentSyntaxTreeNode.php',
-	'tx_fluid_viewhelpers_aliasviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/AliasViewHelperTest.php',
-	'tx_fluid_viewhelpers_baseviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/BaseViewHelperTest.php',
-	'tx_fluid_viewhelpers_cycleviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/CycleViewHelperTest.php',
-	'tx_fluid_viewhelpers_elseviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/ElseViewHelperTest.php',
-	'tx_fluid_viewhelpers_forviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/ForViewHelperTest.php',
-	'tx_fluid_viewhelpers_groupedforviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/GroupedForViewHelperTest.php',
-	'tx_fluid_viewhelpers_ifviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/IfViewHelperTest.php',
-	'tx_fluid_viewhelpers_thenviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/ThenViewHelperTest.php',
-	'tx_fluid_viewhelpers_viewhelperbasetestcase' => $extensionPath . 'Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php',
-	'tx_fluid_viewhelpers_fixtures_constraintsyntaxtreenode' => $extensionPath . 'Tests/Unit/ViewHelpers/Fixtures/ConstraintSyntaxTreeNode.php',
-	'tx_fluid_viewhelpers_form_abstractformfieldviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_abstractformviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_checkboxviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_errorsviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/ErrorsViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_hiddenviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/HiddenViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_radioviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_selectviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_submitviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/SubmitViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_textareaviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/TextareaViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_textboxviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/TextboxViewHelperTest.php',
-	'tx_fluid_viewhelpers_form_uploadviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php',
-	'tx_fluid_viewhelpers_fixtures_emptysyntaxtreenode' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/Fixtures/EmptySyntaxTreeNode.php',
-	'tx_fluid_viewhelpers_fixtures_userdomainclass' => $extensionPath . 'Tests/Unit/ViewHelpers/Form/Fixtures/Fixture_UserDomainClass.php',
-	'tx_fluid_viewhelpers_format_currencyviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php',
-	'tx_fluid_viewhelpers_format_dateviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php',
-	'tx_fluid_viewhelpers_format_nl2brviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php',
-	'tx_fluid_viewhelpers_format_numberviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php',
-	'tx_fluid_viewhelpers_format_paddingviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php',
-	'tx_fluid_viewhelpers_format_printfviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Format/PrintfViewHelperTest.php',
-	'tx_fluid_viewhelpers_link_emailviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php',
-	'tx_fluid_viewhelpers_link_externalviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php',
-	'tx_fluid_viewhelpers_uri_emailviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php',
-	'tx_fluid_viewhelpers_uri_externalviewhelpertest' => $extensionPath . 'Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php',
+	'tx_fluid_exception' => $extensionClassesPath . 'Exception.php',
+	'tx_fluid_fluid' => $extensionClassesPath . 'Fluid.php',
+	'tx_fluid_compatibility_docbookgeneratorservice' => $extensionClassesPath . 'Compatibility/DocbookGeneratorService.php',
+	'tx_fluid_compatibility_objectmanager' => $extensionClassesPath . 'Compatibility/ObjectManager.php',
+	'tx_fluid_compatibility_templateparserbuilder' => $extensionClassesPath . 'Compatibility/TemplateParserBuilder.php',
+	'tx_fluid_core_exception' => $extensionClassesPath . 'Core/Exception.php',
+	'tx_fluid_core_parser_configuration' => $extensionClassesPath . 'Core/Parser/Configuration.php',
+	'tx_fluid_core_parser_exception' => $extensionClassesPath . 'Core/Parser/Exception.php',
+	'tx_fluid_core_parser_interceptorinterface' => $extensionClassesPath . 'Core/Parser/InterceptorInterface.php',
+	'tx_fluid_core_parser_parsedtemplateinterface' => $extensionClassesPath . 'Core/Parser/ParsedTemplateInterface.php',
+	'tx_fluid_core_parser_parsingstate' => $extensionClassesPath . 'Core/Parser/ParsingState.php',
+	'tx_fluid_core_parser_templateparser' => $extensionClassesPath . 'Core/Parser/TemplateParser.php',
+	'tx_fluid_core_parser_interceptor_escape' => $extensionClassesPath . 'Core/Parser/Interceptor/Escape.php',
+	'tx_fluid_core_parser_syntaxtree_abstractnode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/AbstractNode.php',
+	'tx_fluid_core_parser_syntaxtree_arraynode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/ArrayNode.php',
+	'tx_fluid_core_parser_syntaxtree_nodeinterface' => $extensionClassesPath . 'Core/Parser/SyntaxTree/NodeInterface.php',
+	'tx_fluid_core_parser_syntaxtree_objectaccessornode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/ObjectAccessorNode.php',
+	'tx_fluid_core_parser_syntaxtree_renderingcontextawareinterface' => $extensionClassesPath . 'Core/Parser/SyntaxTree/RenderingContextAwareInterface.php',
+	'tx_fluid_core_parser_syntaxtree_rootnode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/RootNode.php',
+	'tx_fluid_core_parser_syntaxtree_textnode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/TextNode.php',
+	'tx_fluid_core_parser_syntaxtree_viewhelpernode' => $extensionClassesPath . 'Core/Parser/SyntaxTree/ViewHelperNode.php',
+	'tx_fluid_core_rendering_renderingcontext' => $extensionClassesPath . 'Core/Rendering/RenderingContext.php',
+	'tx_fluid_core_rendering_renderingcontextinterface' => $extensionClassesPath . 'Core/Rendering/RenderingContextInterface.php',
+	'tx_fluid_core_viewhelper_abstractconditionviewhelper' => $extensionClassesPath . 'Core/ViewHelper/AbstractConditionViewHelper.php',
+	'tx_fluid_core_viewhelper_abstracttagbasedviewhelper' => $extensionClassesPath . 'Core/ViewHelper/AbstractTagBasedViewHelper.php',
+	'tx_fluid_core_viewhelper_abstractviewhelper' => $extensionClassesPath . 'Core/ViewHelper/AbstractViewHelper.php',
+	'tx_fluid_core_viewhelper_argumentdefinition' => $extensionClassesPath . 'Core/ViewHelper/ArgumentDefinition.php',
+	'tx_fluid_core_viewhelper_arguments' => $extensionClassesPath . 'Core/ViewHelper/Arguments.php',
+	'tx_fluid_core_viewhelper_exception' => $extensionClassesPath . 'Core/ViewHelper/Exception.php',
+	'tx_fluid_core_viewhelper_tagbasedviewhelper' => $extensionClassesPath . 'Core/ViewHelper/TagBasedViewHelper.php',
+	'tx_fluid_core_viewhelper_tagbuilder' => $extensionClassesPath . 'Core/ViewHelper/TagBuilder.php',
+	'tx_fluid_core_viewhelper_templatevariablecontainer' => $extensionClassesPath . 'Core/ViewHelper/TemplateVariableContainer.php',
+	'tx_fluid_core_viewhelper_viewhelperinterface' => $extensionClassesPath . 'Core/ViewHelper/ViewHelperInterface.php',
+	'tx_fluid_core_viewhelper_viewhelpervariablecontainer' => $extensionClassesPath . 'Core/ViewHelper/ViewHelperVariableContainer.php',
+	'tx_fluid_core_viewhelper_exception_invalidvariableexception' => $extensionClassesPath . 'Core/ViewHelper/Exception/InvalidVariableException.php',
+	'tx_fluid_core_viewhelper_exception_renderingcontextnotaccessibleexception' => $extensionClassesPath . 'Core/ViewHelper/Exception/RenderingContextNotAccessibleException.php',
+	'tx_fluid_core_viewhelper_facets_childnodeaccessinterface' => $extensionClassesPath . 'Core/ViewHelper/Facets/ChildNodeAccessInterface.php',
+	'tx_fluid_core_viewhelper_facets_postparseinterface' => $extensionClassesPath . 'Core/ViewHelper/Facets/PostParseInterface.php',
+	'tx_fluid_service_docbookgenerator' => $extensionClassesPath . 'Service/DocbookGenerator.php',
+	'tx_fluid_view_abstracttemplateview' => $extensionClassesPath . 'View/AbstractTemplateView.php',
+	'tx_fluid_view_exception' => $extensionClassesPath . 'View/Exception.php',
+	'tx_fluid_view_templateview' => $extensionClassesPath . 'View/TemplateView.php',
+	'tx_fluid_view_templateviewinterface' => $extensionClassesPath . 'View/TemplateViewInterface.php',
+	'tx_fluid_view_exception_invalidsectionexception' => $extensionClassesPath . 'View/Exception/InvalidSectionException.php',
+	'tx_fluid_view_exception_invalidtemplateresourceexception' => $extensionClassesPath . 'View/Exception/InvalidTemplateResourceException.php',
+	'tx_fluid_viewhelpers_aliasviewhelper' => $extensionClassesPath . 'ViewHelpers/AliasViewHelper.php',
+	'tx_fluid_viewhelpers_baseviewhelper' => $extensionClassesPath . 'ViewHelpers/BaseViewHelper.php',
+	'tx_fluid_viewhelpers_cobjectviewhelper' => $extensionClassesPath . 'ViewHelpers/CObjectViewHelper.php',
+	'tx_fluid_viewhelpers_countviewhelper' => $extensionClassesPath . 'ViewHelpers/CountViewHelper.php',
+	'tx_fluid_viewhelpers_cycleviewhelper' => $extensionClassesPath . 'ViewHelpers/CycleViewHelper.php',
+	'tx_fluid_viewhelpers_debugviewhelper' => $extensionClassesPath . 'ViewHelpers/DebugViewHelper.php',
+	'tx_fluid_viewhelpers_elseviewhelper' => $extensionClassesPath . 'ViewHelpers/ElseViewHelper.php',
+	'tx_fluid_viewhelpers_escapeviewhelper' => $extensionClassesPath . 'ViewHelpers/EscapeViewHelper.php',
+	'tx_fluid_viewhelpers_flashmessagesviewhelper' => $extensionClassesPath . 'ViewHelpers/FlashMessagesViewHelper.php',
+	'tx_fluid_viewhelpers_forviewhelper' => $extensionClassesPath . 'ViewHelpers/ForViewHelper.php',
+	'tx_fluid_viewhelpers_formviewhelper' => $extensionClassesPath . 'ViewHelpers/FormViewHelper.php',
+	'tx_fluid_viewhelpers_groupedforviewhelper' => $extensionClassesPath . 'ViewHelpers/GroupedForViewHelper.php',
+	'tx_fluid_viewhelpers_ifviewhelper' => $extensionClassesPath . 'ViewHelpers/IfViewHelper.php',
+	'tx_fluid_viewhelpers_imageviewhelper' => $extensionClassesPath . 'ViewHelpers/ImageViewHelper.php',
+	'tx_fluid_viewhelpers_layoutviewhelper' => $extensionClassesPath . 'ViewHelpers/LayoutViewHelper.php',
+	'tx_fluid_viewhelpers_renderflashmessagesviewhelper' => $extensionClassesPath . 'ViewHelpers/RenderFlashMessagesViewHelper.php',
+	'tx_fluid_viewhelpers_renderviewhelper' => $extensionClassesPath . 'ViewHelpers/RenderViewHelper.php',
+	'tx_fluid_viewhelpers_sectionviewhelper' => $extensionClassesPath . 'ViewHelpers/SectionViewHelper.php',
+	'tx_fluid_viewhelpers_thenviewhelper' => $extensionClassesPath . 'ViewHelpers/ThenViewHelper.php',
+	'tx_fluid_viewhelpers_translateviewhelper' => $extensionClassesPath . 'ViewHelpers/TranslateViewHelper.php',
+	'tx_fluid_viewhelpers_be_abstractbackendviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/AbstractBackendViewHelper.php',
+	'tx_fluid_viewhelpers_be_containerviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/ContainerViewHelper.php',
+	'tx_fluid_viewhelpers_be_pageinfoviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/PageInfoViewHelper.php',
+	'tx_fluid_viewhelpers_be_pagepathviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/PagePathViewHelper.php',
+	'tx_fluid_viewhelpers_be_buttons_cshviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/Buttons/CshViewHelper.php',
+	'tx_fluid_viewhelpers_be_buttons_iconviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/Buttons/IconViewHelper.php',
+	'tx_fluid_viewhelpers_be_buttons_shortcutviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/Buttons/ShortcutViewHelper.php',
+	'tx_fluid_viewhelpers_be_menus_actionmenuitemviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/Menus/ActionMenuItemViewHelper.php',
+	'tx_fluid_viewhelpers_be_menus_actionmenuviewhelper' => $extensionClassesPath . 'ViewHelpers/Be/Menus/ActionMenuViewHelper.php',
+	'tx_fluid_viewhelpers_form_abstractformfieldviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/AbstractFormFieldViewHelper.php',
+	'tx_fluid_viewhelpers_form_abstractformviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/AbstractFormViewHelper.php',
+	'tx_fluid_viewhelpers_form_checkboxviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/CheckboxViewHelper.php',
+	'tx_fluid_viewhelpers_form_errorsviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/ErrorsViewHelper.php',
+	'tx_fluid_viewhelpers_form_hiddenviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/HiddenViewHelper.php',
+	'tx_fluid_viewhelpers_form_passwordviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/PasswordViewHelper.php',
+	'tx_fluid_viewhelpers_form_radioviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/RadioViewHelper.php',
+	'tx_fluid_viewhelpers_form_selectviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/SelectViewHelper.php',
+	'tx_fluid_viewhelpers_form_submitviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/SubmitViewHelper.php',
+	'tx_fluid_viewhelpers_form_textareaviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/TextareaViewHelper.php',
+	'tx_fluid_viewhelpers_form_textboxviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/TextboxViewHelper.php',
+	'tx_fluid_viewhelpers_form_textfieldviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/TextfieldViewHelper.php',
+	'tx_fluid_viewhelpers_form_uploadviewhelper' => $extensionClassesPath . 'ViewHelpers/Form/UploadViewHelper.php',
+	'tx_fluid_viewhelpers_format_cropviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/CropViewHelper.php',
+	'tx_fluid_viewhelpers_format_currencyviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/CurrencyViewHelper.php',
+	'tx_fluid_viewhelpers_format_dateviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/DateViewHelper.php',
+	'tx_fluid_viewhelpers_format_htmlviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/HtmlViewHelper.php',
+	'tx_fluid_viewhelpers_format_nl2brviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/Nl2brViewHelper.php',
+	'tx_fluid_viewhelpers_format_numberviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/NumberViewHelper.php',
+	'tx_fluid_viewhelpers_format_paddingviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/PaddingViewHelper.php',
+	'tx_fluid_viewhelpers_format_printfviewhelper' => $extensionClassesPath . 'ViewHelpers/Format/PrintfViewHelper.php',
+	'tx_fluid_viewhelpers_link_actionviewhelper' => $extensionClassesPath . 'ViewHelpers/Link/ActionViewHelper.php',
+	'tx_fluid_viewhelpers_link_emailviewhelper' => $extensionClassesPath . 'ViewHelpers/Link/EmailViewHelper.php',
+	'tx_fluid_viewhelpers_link_externalviewhelper' => $extensionClassesPath . 'ViewHelpers/Link/ExternalViewHelper.php',
+	'tx_fluid_viewhelpers_link_pageviewhelper' => $extensionClassesPath . 'ViewHelpers/Link/PageViewHelper.php',
+	'tx_fluid_viewhelpers_uri_actionviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/ActionViewHelper.php',
+	'tx_fluid_viewhelpers_uri_emailviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/EmailViewHelper.php',
+	'tx_fluid_viewhelpers_uri_externalviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/ExternalViewHelper.php',
+	'tx_fluid_viewhelpers_uri_imageviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/ImageViewHelper.php',
+	'tx_fluid_viewhelpers_uri_pageviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/PageViewHelper.php',
+	'tx_fluid_viewhelpers_uri_resourceviewhelper' => $extensionClassesPath . 'ViewHelpers/Uri/ResourceViewHelper.php',
 );
 ?>
\ No newline at end of file
diff --git a/typo3/sysext/fluid/ext_emconf.php b/typo3/sysext/fluid/ext_emconf.php
index e7c6a26b915757934575134e96892a7befbcc283..6d26919a4f5f68ef4fffce356a2377f90da78069 100755
--- a/typo3/sysext/fluid/ext_emconf.php
+++ b/typo3/sysext/fluid/ext_emconf.php
@@ -29,10 +29,10 @@ $EM_CONF[$_EXTKEY] = array(
 	'clearCacheOnLoad' => 0,
 	'lockType' => '',
 	'author_company' => '',
-	'version' => '1.2.1',
+	'version' => '1.3.0alpha1',
 	'constraints' => array(
 		'depends' => array(
-			'extbase' => '',
+			'extbase' => '1.3.0alpha1',
 		),
 		'conflicts' => array(
 		),
diff --git a/typo3/sysext/fluid/last_synched_target b/typo3/sysext/fluid/last_synched_target
index a1dada429771ce14ed539e5b91a2fce6d3f08a79..f567b1fe866a8ad075fd1dcf50a0fa4dbf271f42 100644
--- a/typo3/sysext/fluid/last_synched_target
+++ b/typo3/sysext/fluid/last_synched_target
@@ -1 +1 @@
-https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/tags/1.2.1/
+https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/tags/1.3.0alpha1/