Can I display the Django-CMS menu in a non-CMS application?

In a Django project, I have a Django-CMS and another application (name it "App B"). I want the menu set to be configured in both applications. I have added new items using menu_pool.register_menu. This page says

Please note that the menus were initially implemented as application independent and as such, in the menu menu instead of “normal” cms

so I would expect that I can write the same menu tag in the template for "App B" as for CMS. I have it both in my "App B" template and in my CMS template:

<ul>{% show_menu 0 100 0 1  %}</ul>

In CMS, it works by showing a complete menu. In “Appendix B,” it just displays a space:

<ul></ul>

I do not want to create a plugin or application if necessary. Should I?

EDIT: I tried this with the App-Hook, but it still doesn't work.

+3
source share
2 answers

There is a template tag for this: show_menu_below_id

+3
source

In the following quote:

Note

All views attached like this should return an instance of RequestContext instead of a default context instance.

I just had to add context_instance=RequestContext(request)to my render_to_responses.

+1
source

Source: https://habr.com/ru/post/1788726/


All Articles