Liferay - display only top menu pages in navigatio

2019-08-30 00:23发布

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条回答
Juvenile、少年°
2楼-- · 2019-08-30 01:13

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.

查看更多
登录 后发表回答