Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-38516

nav-item taglib shouldn't be displayed if it's dropdown=true and it doesn't have children



      There are several places in the portal where we where using liferay-ui:icon-menu as a navigation item. Then, with the migration to alloy 2.0 we changed those places and were replaced by aui-nav items tags.

      However, these 2 taglibs are not exactly the same and nav-items is missing a behaviour that is causing some bugs in the portal.

      The taglib liferay-ui:icon-menu is displayed if it contains any liferay-ui:icon inside. If there are no icon-menu, the taglib is not displayed at all.

      However, with nav-items, the taglib is always displayed, no matter if we have some nav-item children or not.

      Then, there are some places in the portal where this is leading to bugs: in Web Content, the Add button is always displayed, although maybe the user doesn't have any permission to add any web content or article. Some happens with the Add button in Documents and Media. My Sites (in the top right corner) have the same issue: it's displayed although maybe the user doesn't belong to any site.

      So, we need to improve this taglib to make it smart:

      If a nav-item taglib has dropDown=true, we should only display it if there is at least one nav-item child. Otherwise, we shouldn't display anything.


          Issue Links



              • Assignee:
                brian.chan Brian Chan
                sergio.gonzalez Sergio Gonzalez (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:
                  Days since last comment:
                  6 years, 29 weeks, 5 days ago


                  Version Package
                  6.2.0 CE RC1