python - how to make a separate menu on the page? -


Please tell me how Djesgo-cm is a separate menu page

For example, the main menu :

main-blog-dialog -map

I want that when the user is on the left column "Blog" Are:

  -blog1 -blog2-blog3  

but not on other pages of the menu.

I have created 2 templates: one column and two-column. Two-column page templates were assigned for "blogs". The problem is that I do not understand how to pair an additional menu

firstly I suggest you

  1. {% show_menu%}

    / li>

  2. {% show_menu_below_id 'CMS_PAGE_ID'%}

(CMS pages for navigation should be published or checked or they will not appear in the menu) < / Strong>

Automatically generates a menu using both tag templates, if you make a file in , You can customize this template: your_project / templates / menu / menu.html or place the template in any other location and it will display template tags such as {% show_menu 100 100 100 100 ' Add / code> in yourpath / template_name.html '%}.

The biggest difference between these 2 templatetags is that the first shows a real page navigation (I explain later on the basis of some variables to parents or children) and the second page is unique Automatically runs the menu on the page using the ID (when editing the CMS page / you should enter this unique ID in the advanced option)

the project, what you are trying to achieve Are they You can use the following:

  {% show_menu 0 2 100 100%}  

You should check the documentation I best understand this number 4 Look at the beginning but important here is first and second

  • The first number refers to initial (the lowest level you want to show)
  • < Li> Second number Ultimate (the highest level you want to show)

So if you type {% show_menu 0 2 100 100%} If you do The CMS page will show levels from 0 to 2, this can be your main menu

This is the best way to add a menu to your template, if you want to add another menu, then you repeat the template tag. And can play with numbers corresponding to your needs


Comments