Liferay - display only top menu pages in navigation portlet

…衆ロ難τιáo~ 提交于 2019-12-13 03:57:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!