Bug #78031

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

Added by Cyril Janody almost 3 years ago. Updated 2 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Fluid Styled Content
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>

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


Related issues

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

History

#1 Updated by Cyril Janody over 2 years ago

  • File deleted (DirectoryViewHelper.php.patch)

#2 Updated by Cyril Janody over 2 years ago

#3 Updated by Cyril Janody over 2 years ago

  • Subject changed from ce:menu.directory maximum level does not work properly to ce:menu.directory maximum level does not work properly (has patch)

#4 Updated by Cyril Janody over 2 years ago

  • Target version set to next-patchlevel
  • Complexity set to no-brainer

#5 Updated by Michael Oehlhof over 2 years ago

Hi Cyril,

if you register for Slack at https://forger.typo3.org/slack I can guide you on Slack https://typo3.slack.com to commit your patch by yourself if you like.

Regards
Michael

#6 Updated by Cyril Janody over 2 years ago

Hi Michael,
Good idea, I created my account on slack. What should I do now ?
Thank you for your help.
Sincerely
Cyril

#7 Updated by Riccardo De Contardi over 2 years ago

I think that this should be solved for 8.7-dev, as <ce:menu.directory> is no more used. Can someone confirm?

#8 Updated by Sybille Peters over 1 year ago

Thank you for your report.

Even though it has been some time, would you consider checking if your patch idea is still up to date and upload it to our Gerrit review server?

Someone could do this for you, but I am thinking you might like the opportunity to contribute to TYPO3 yourself.

You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel.

Also, if your issue is no longer reproducable, please let us know in the slack channel, so that this issue can be closed.

Thank you in advance!

Sybille

#9 Updated by Riccardo De Contardi 4 months ago

I tried to test this kind of issue on 9.5.4;

as the viewhelper ce:menu.directory> is no more present since 8.7.x, I used instead a content element of type "Sitemap of selected pages" that should be its equivalent, if I am not wrong.

I replicated the page structure in the issue description and added the following TypoScript on my setup:

tt_content.menu_sitemap_pages.dataProcessing.10.levels=2

to limit the number of levels.

The frontend structure seems correct; is it sufficient to consider this issue closed? A different test should be performed?

#10 Updated by Benni Mack 2 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

Also available in: Atom PDF