I'm trying to run project using Django-cms 3.6.0. It was created using Django-cms 2.3.8, I'm trying to use the old code. In this new version the menu with subpages links doesn't appear. children variable in template doesn't seem to contain anything.
I expect it to show links to 4 subpages of a page. I've added pages manually in admin UI in new version of django-cms.subbase.html:
{% extends "base.html" %}
{% load i18n %}
{% load menu_tags cms_tags %}
...
{% block left_menu %}
<nav id="lMenu">
{% show_menu 1 1 0 1 "menu/sub_menu.html" %}
{% block left_content %}{% endblock left_content %}
</nav>
{% endblock left_menu %}
sub_menu.html:
{% load menu_tags %}
<ul class="subMenu">
{% for child in children %}
<li><a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}" title="{{ child.get_menu_title }}">{{ child.get_menu_title }}</a></li>
{% endfor %}
</ul>
I've checked in database, using manage.py shell, that those pages has child pages:
from cms.models.pagemodel import Page
pages = Page.object.all()
children = pages[2].get_descendant_pages()
And now, e.g., calling pages[2].get_menu_title(), children[0].get_menu_title() returns expected proper names of the pages, as added through UI.
I haven't found much about this children variable in docs. Should this still work this way in 3.6? What is the proper way to refer to child pages in template?
1 1 0 1correspond do how you've built your tree? If you remove those args does it show children? Thechildrencontext variable is correct; docs.django-cms.org/en/release-3.6.x/topics/… - markwalker_