django-cms 菜单消失

发布于 2024-12-17 18:12:55 字数 877 浏览 1 评论 0原文

我正在使用 django-cms 2.2,我的菜单突然消失了。没有错误消息。页面正常呈现,菜单除外。我正在使用:

{% show_menu 0 0 100 100 "menu/show_menu_template.html" %}

命令,正如我检查的那样,它位于 show_menu_template 内部。 showmenu_template 是标准的,如下,它之前可以工作,欢呼

{% load menu_tags %}
{% for child in children %}

<li class="{% if forloop.last %}last {% endif %}{% if child.selected %}current selected{% endif %}{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}">
    <a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a>
    {% if child.children %}
    <ul>
    {% show_menu from_level to_level extra_inactive extra_active template "" "" child %}
    </ul>
    {% endif %}
</li> 
{% endfor %}

I am using django-cms 2.2 and my menu suddenly disappeared. There's no error message. Page renders normally, with exception of menu. I am using:

{% show_menu 0 0 100 100 "menu/show_menu_template.html" %}

command, and as i checked it goes inside of show_menu_template.
showmenu_template is standard and as follows, it was working before, cheers

{% load menu_tags %}
{% for child in children %}

<li class="{% if forloop.last %}last {% endif %}{% if child.selected %}current selected{% endif %}{% if child.ancestor %}ancestor{% endif %}{% if child.sibling %}sibling{% endif %}{% if child.descendant %}descendant{% endif %}">
    <a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a>
    {% if child.children %}
    <ul>
    {% show_menu from_level to_level extra_inactive extra_active template "" "" child %}
    </ul>
    {% endif %}
</li> 
{% endfor %}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对你的占有欲 2024-12-24 18:12:55

我已经更改了模板内的标签,它开始工作,我不知道为什么它之前不工作并且停止了,但该怎么办

{% show_menu 1 1 100 100 "menu/show_menu_template.html" %}

I've changed the tag inside the template and it started working, am not sure why it was not working before and stopped as such but what to do

{% show_menu 1 1 100 100 "menu/show_menu_template.html" %}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文