[TYPO3-mvc] Category tree - problem double names

Dawid Pacholczyk dpacholczyk at gmail.com
Wed Sep 14 18:01:09 CEST 2011


Thx for the tip BUT it`s not warking too good :(

My List.html


<f:render section="categoryTree" arguments="{categories:categories}" />


<f:section name="categoryTree">
	<ul>
		<f:for each="{categories}" as="category">
			{category.title}
			<f:if condition="{category.childrens}">
				<f:render section="categoryTree" arguments="{categories : 
category.childrens}" />
			</f:if>
		</f:for>
	</ul>
</f:section>

This what i received (Poziom = Level :) )

Poziom 1a

     Poziom 2a
         Poziom 3a Poziom 2b

Poziom 2a

     Poziom 3a

Poziom 3a Poziom 2b Poziom 1b


Still I have doubled names before next level 1 category :/

Best regards,
Dawid Pacholczyk


W dniu 2011-09-14 15:50, Bastian Waidelich pisze:
> Dawid Pacholczyk wrote:
>
> Hi Dawid,
>
>> Hello List, I want to build simple category tree. I parent, many childs.
>
> Try using sections then you don't need duplicate fluid snippets.
> see
> <http://git.typo3.org/FLOW3/Packages/TYPO3.git?a=blob;f=Resources/Private/Templates/TypoScriptObjects/Menu.html;h=2e1c326e80d577af6be3910ba9bb78e16cd444e0;hb=HEAD>
> for an example.
>
>
> HTH,
> Bastian



More information about the TYPO3-project-typo3v4mvc mailing list