Skip to content

Columns functionality for \Magento\Theme\Block\Html\Topmenu seems broken #38326

Open
@ioweb-gr

Description

@ioweb-gr

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.

                        <arguments>
                            <argument name="columns_limit" xsi:type="number">10</argument>
                        </arguments>

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

                        <arguments>
                            <argument name="columns_limit" xsi:type="number">10</argument>
                        </arguments>

In the topnav block.

menu.tar.gz

Proposed solution

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: UI FrameworkComponent: FrontendIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: PR in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions