Project

General

Profile

Actions

Bug #78031

closed

ce:menu.directory maximum level does not work properly (has patch)

Added by Cyril Janody about 8 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Fluid Styled Content
Target version:
-
Start date:
2016-09-21
Due date:
% Done:

0%

Estimated time:
0.50 h
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

To reproduce:
1- Back-end page tree :
  • ###
    • ####
    • ####
    • ####
  • ###
    • ####
    • ####
      • ####
      • ####
    • ####
      • ####
  • ###
    • ####
  • ###

2- HTML template

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:ce="http://typo3.org/ns/TYPO3/CMS/FluidStyledContent/ViewHelpers" data-namespace-typo3-fluid="true">
<ce:menu.directory pageUids="{pageUids}" as="pages" levelAs="level" maximumLevel="2">
    <f:if condition="{pages}">
        <ul>
            <f:for each="{pages}" as="page">
                <li>
                    <f:link.page pageUid="{page.uid}">
                        <f:if condition="{page.nav_title}">
                            <f:then>
                                {page.nav_title}
                            </f:then>
                            <f:else>
                                {page.title}
                            </f:else>
                        </f:if>
                    </f:link.page>
                    <f:render partial="Menu/Directory" arguments="{pageUids: {0: page.uid}}" />
                </li>
            </f:for>
        </ul>
    </f:if>
</ce:menu.directory>
</html>

3- HTML result

<ul>
    <li>
        ###
        <ul>
            <li>####</li>
            <li>####</li>
            <li>####</li>
        </ul>
    </li>
    <li>###</li>
    <li>###</li>
    <li>###</li>
</ul>

4- Expected result

<ul>
    <li>
        ###
        <ul>
            <li>####</li>
            <li>####</li>
            <li>####</li>
        </ul>
    </li>
    <li>
        ###
        <ul>
            <li>####</li>
            <li>####</li>
            <li>####</li>
        </ul>
    </li>
    ...
    ...
</ul>


Files

DirectoryViewHelper.patch (1.39 KB) DirectoryViewHelper.patch patch Cyril Janody, 2016-10-06 22:26

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #79622: Streamline CSS Styled Content and Fluid Styled ContentClosed2017-02-28

Actions
Actions

Also available in: Atom PDF