[TYPO3-mvc] Get childs

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Oct 22 11:48:43 CEST 2010


Hi,

> *#1225709595: The template files
> "something/Resources/Private/Partials/DocumentTemplateElement.html" ** could
> not be loaded.*
>
> should I load it in some special way ?

"documentTemplateElement" was just a example naming used by the 
extension of Dennis. You have to create and name the partials for your 
extension yourself.

So in your case the templates should look like this:

--- Resources/Private/Templates/Block/NameOfAction.html ------------
<f:for each="{blocks}" as="block">
	<f:render partial="BlockElement" arguments="{block: block}" />
</f:for>

--- Resources/Private/Partials/BlockElement.html --------------------
<div class="bodytext">
	Here your render your block and check for subBlocks
	<h2>{block.headline}</h2>
	<f:if condition="{f:count(subject:block.subBlocks)}">
		<f:for each="{block.subBlocks}" as="subBlock">
			<f:render partial="BlockElement" arguments={block:subBlock}" />
		</f:for>
	</f:if>
</div>
---------------------------------------------------------------------

That's it. Of course your block domain model has to have a correctly 
configured (TCA, as well as getter/setter in the model) property for 
"subBlocks" or however this property is called in your domain model.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list