Liferay-在导航portlet中仅显示顶部菜单页面 [英] Liferay - display only top menu pages in navigation portlet
问题描述
我需要使用导航portlet(71)仅显示顶部菜单页面(级别0).
无法通过其配置以此方式配置此portlet.因此,问题是,解决此问题的最佳方法是什么?
It is not possible to configure this portlet in such way through his Configuration. So, the question is, what is the best approach to solve this problem:
- 创建新的portlet(类似于导航)
- 挂钩导航portlet
- 还有其他想法吗?
非常感谢.
推荐答案
导航portlet使用Liferays标记-liferay-ui:navigation
.您可以创建一个小的jsp挂钩来覆盖/html/taglib/ui/navigation/page.jsp
.在此jsp中,您可以对项目的显示方式进行修改.
Navigation portlet is using Liferays tag - liferay-ui:navigation
. You can create a small jsp-hook to override /html/taglib/ui/navigation/page.jsp
. In this jsp you can make your modifications in how to display the items.
还要检查liferay-ui:navigation
中的nestedChildren
属性.我不记得它到底是做什么的,但可能会对您的情况有所帮助.
Also check the nestedChildren
attribute in liferay-ui:navigation
. I don't remember what exactly it does, but could be something helpful for your case.
这篇关于Liferay-在导航portlet中仅显示顶部菜单页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!