我想在Zotonic显示三级菜单项。
例如,如果在层次结构中有页面,如下所示:
关于我们的here?
我想要为什么在这里工作?可以在下拉菜单中访问.
如何在Zotonic获得三级菜单项?
发布于 2010-10-21 14:44:58
我使用了和修改过的菜单模板。这需要Zotonic 0.5.0或更高版本。
text
Menu
(从text
到text/modules/mod_menu/templates/_menu.tpl
)的谓词:打开原始菜单模板:
{%如果菜单%} {%表示中间、深度、nr、菜单中的has_sub } { % }{%,如果深度>1 %} {% endif %} {% == 1,而不是forloop.first %} {% endif %} { m.rsc[mid].short_title|default:m.rsc[mid].title } {% (如果不是has_sub %}{% endif %}{% endif %}{% endif %} {% endif %} {%,如果forloop.last %} { % }包括"_menu_extra.tpl“%} {% endif%}{%endif%}
进入第三级菜单版本:
{%如果菜单%} {%表示中间、深度、nr、菜单中的has_sub } { % }{%,如果深度>1 %} {% endif %} {% == 1,而不是forloop.first %} {% endif %} { m.rsc[mid].short_title|default:m.rsc[mid].title } {%如果深度== 2 %}{%用于m.rscmid.menu %} { % } { forloop.first %} {% endif %}{==}{m.rscmid.menu}{% forloop.last %}{% endif %}{% endif %} { forloop.last %}{% %} {forloop.last %} {_menu_extra.tpl %}{% endif %} {% endif %} {% endif %}
通过添加二级项的菜单页连接的特例:
{% if == 2 %}{%用于m.rscmid.menu %}{% %} { forloop.first %} {% endif %} {==}{ forloop.last %} {% %} {% endif %}{% endfor %} {% endif %}页连接中的
中需要第三级项的每个页面
https://stackoverflow.com/questions/3982983
复制相似问题