问题
I need to use Navigation portlet (71) to display only top menu pages (level 0).
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:
- Create new portlet (navigation-like)
- Hook navigation portlet
- Any other ideas?
Thanks a lot.
回答1:
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.
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.
来源:https://stackoverflow.com/questions/22328085/liferay-display-only-top-menu-pages-in-navigation-portlet