Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11260

Menu Application: generate different class to li of the menu and submenu

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.4.6
    • Fix Version/s: None
    • Component/s: Menu
    • Labels:
      None
    • Difficulty:
      Easy
    • Similar issues:

      Description

      I always find problems to customize the menu because it haven't specific classes
      The idea is to generate a different classes to the liste " li " of the menu and for the " ul " of submenu to make it easy to customize and allows us to go far in the css customization.

      for example the code generated should be like this:

      <ul>
        <li class="item1"></li>
        <li class="item2"></li>
        <li class="item3">
           <ul class="SubMenu1">
                <li class="item1"></li>
                <li class="item2"></li>
                <li class="item3"></li>
           </ul>
        </li>
        <li class="item4">
           <ul class="SubMenu2">
                <li class="item1"></li>
                <li class="item2"></li>
                <li class="item3"></li>
           </ul>
        </li>
      </ul>
      

      i have did this in my project and it's what i need :

        $( ".menu-horizontal>ul>li" ).addClass(function( index ) {
        return "item-" + index;});
         $( ".menu-horizontal ul ul" ).addClass(function( index ) {
        return "subMenu-" + index;});
           $( ".menu-horizontal ul ul li" ).addClass(function( index ) {
        return "subItem-" + index;});
      

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              ykebir kebir
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: