I'm new to django and django-cms. I read the official docs and tried to find any other info on the internet, that could guide me through making dropdown menus in django cms. But unfortunately for me, the official docs are really raw (I don't get it at all what's about the menus) and on the internet there's nothing sensible enough.
Please explain me or give a step by step guide on this topic.
At this moment the menu is working and the only code that I have for that is a pair of <ul> and this {% show_menu 0 100 100 100 %} inside them.
The most simple way to get dropdowns working in django-cms is to follow this: (In this example I am using Bootstrap code for my menu)
In your base.html file (or any other name that you are using) use this way of showing your menu {% show_menu 0 10 10 10 %} As an example, this is what i used in my code in base.html to render the menu:
<ul>
{% show_menu 0 10 10 10 "menu/custom-menu.html" %}
</ul>
Now create the template in the directory "/templates/menu/custom-menu.html" with these sekizai tags and similar html code that will overwrite your base.html and render your menu with drop-down elements:
<div class="dropdown">
{% for child in children %}
<!-- no child pages -->
{% if child.is_leaf_node %}
<li><a href="{{ child.get_absolute_url }}">{{child.get_menu_title }}</a></li>
{% endif %}
<!-- /no child pages -->
<!-- has child pages -->
{% if not child.is_leaf_node or child.ancestor %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{child.get_menu_title }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% if child.get_descendants %}
{% for kid in child.get_descendants %}
<li>
<a href="{{ kid.get_absolute_url }}">
{{kid.get_menu_title }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</li>
{% endif %}
<!-- /has child pages -->
{% endfor %}
<!-- /end for child -->
</div>
And dont forget to put the {% load menu_tags %} sekizai tag in the top of your custom-menu.html file.