Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Showing a menu above level 0 always renders sibling's children #8321

@stefanw

Description

@stefanw

Description

show_menu will show children of inactive nodes despite setting extra_inactive to 0.

Given a page tree like:

        + P1
        | + P2
        |   + P3
        | + P9
        |   + P10
        |      + P11

Rendering {% show_menu 1 100 0 1 %} on P2 will also render the children of P9.

This is because:

Steps to reproduce

Set up a page structure like above and test with a show menu call like above.

Expected behaviour

The expected behaviour is that P2, P3 and P9 are rendered on page P2 given the above page tree (which is an excerpt from the ExtendedFixturesMenuTests.

Actual behaviour

All sibling's children are rendered.

Additional information (CMS/Python/Django versions)

Present in latest Django CMS 5.1.0dev1.

Do you want to help fix this issue?

A PR with test will be added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions