-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Columns functionality for \Magento\Theme\Block\Html\Topmenu seems broken #38326
Comments
Hi @ioweb-gr. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
To add some more observations, it seems that it does render the items grouped in columns but the CSS is not proper for the change. So apart from the exception, the problem must be that the CSS is not taking this situation into account to render the columns even though the functionality is there |
Hi @engcom-November. Thank you for working on this issue.
|
Hello @ioweb-gr, Thank you for the report and collaboration! We were able to reproduce this issue on 2.4-develop. And when the limit was set higher then the total number of sub-menu, we got the error. Also this error will be thrown if each menu has different number of sub-menu. Hence confirming this issue. Thank you. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-10756 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
Summary
I'm trying to customize the topmenu without adding 3rd party modules.
I noticed that
\Magento\Theme\Block\Html\Topmenu::getHtml
has the possibility to add a limit and also columns should be possible to add with the built in functionality\Magento\Theme\Block\Html\Topmenu::shouldAddNewColumn
However when setting the value for limit to 10 in
default.xml
e.g.
I get greeted with errors if there's a menu item with less than 10 children
And when using a number that's acceptable for all menu items like 5 then the submenu doesn't render fully.
There's no documentation in the source code or the docs about the built-in functionality which seems partially broken.
Could someone from the core developers let us know if this functionality should be usable (should be working) and perhaps an example for using it?
Examples
Create a menu item with 50 sub categories and try to columnize using
In the
topnav
block.menu.tar.gz
Proposed solution
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: