Django-CMS show_menu parameter explanation

Source: Internet
Author: User

When the page structure is set (/admin/CMS/Page) as follows:

-Home (Level = 0)

-About us (Level = 1)

-About company services (Level = 2)

-Foo bar (Level = 3)

-Our Management Team (Level = 2)

-Some other section (Level = 1)

-Some sub section (Level = 2)

-...


When {% show_menu a B c d %} is inserted in the template, it is actually rendered as a ul-Li menu, and ABCD is the configuration parameter for menu rendering.

A = start)

B = end)

C = inactive)

D = active)

{% Show_menu 1 2 0 100%} indicates:


A = 1: The menu is rendered from level1, excluding home.

B = 2: menu rendering ends until level2 ends, excluding Foo bar.

C = 0: For inactive menu branches of the same level, 0 levels (number) is displayed. That is, if you are on the about us page, no links under some other section are displayed,

But we can see that about company... and our management. Because at this time, the current about us branch is active in the sense, and some other section branches are inactive in the sense.

D = 100: for the current active branch, 100 levels (number) on the current page can be displayed, which is why the aboutcompany... and our management team are displayed.

Refer

Django-CMS show_menu parameter explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.