p:menuitem is not shown on menu without p:submenu

Post Reply
nuttipolc
Posts: 7
Joined: 18 Oct 2016, 04:53

27 May 2019, 12:19

p:menuitem is not shown on Static and Overlay menu without p:submenu?
but it appears on Horizontal and Slim menu.

Code: Select all

    <pb:menu> 
         <p:menuitem id="om_dashboard" value="Dashboard" icon="fa fa-fw fa-dashboard" outcome="/dashboard" />
         <p:menuitem id="om_buy" value="Buy Now" icon="fa fa-fw fa-credit-card-alt" url="https://www.primefaces.org/store" />
         <p:menuitem id="om_doc" value="Documentation" icon="fa fa-fw fa-file-code-o" outcome="/documentation"/>
    </pb:menu>

mert.sincan
Posts: 4638
Joined: 29 Jun 2013, 12:38

30 May 2019, 08:46

Please try;

Code: Select all

<style type="text/css">
    .layout-wrapper .layout-menu-container .layout-menu > li {
        margin-bottom: 0;
    }
    .layout-wrapper .layout-menu-container .layout-menu > li > a {
        display: block;
    }
    .layout-wrapper .layout-menu-container .layout-menu > li.layout-root-menuitem {
        margin-bottom: 16px;
    }
    .layout-wrapper .layout-menu-container .layout-menu > li.layout-root-menuitem > a {
        display: none;
    }
    .layout-wrapper .layout-menu-container .layout-menu > li:not(.layout-root-menuitem) + li.layout-root-menuitem {
        margin-top: 16px;
    }
</style>
Best Regards,

nuttipolc
Posts: 7
Joined: 18 Oct 2016, 04:53

02 Jun 2019, 16:51

It does not work when combining with submenu

Code: Select all

    <pb:menu> 
         <p:menuitem id="om_dashboard" value="Dashboard" icon="fa fa-fw fa-dashboard" outcome="/dashboard" />
         
            <p:submenu id="omx_misc" label="Get Started" icon="fa fa-fw fa-download">
                <p:menuitem id="omx_buy" value="Buy Now" icon="fa fa-fw fa-credit-card-alt" url="https://www.primefaces.org/store" />
                <p:menuitem id="omx_doc" value="Documentation" icon="fa fa-fw fa-file-code-o" outcome="/documentation" />
            </p:submenu>
            
    </pb:menu>
    

mert.sincan
Posts: 4638
Joined: 29 Jun 2013, 12:38

05 Jun 2019, 06:12

Could you please try it with the latest version? Also, what menu option are you using? groupedMenu or ungroupedMenu ?

Best Regards,

nuttipolc
Posts: 7
Joined: 18 Oct 2016, 04:53

06 Jun 2019, 05:47

I've just upgraded to 3.0.1, It works well. The problem is solved.

Best regard,

Thank you.

mert.sincan
Posts: 4638
Joined: 29 Jun 2013, 12:38

10 Jun 2019, 12:47

Glad to hear, thanks a lot for the update!

Best Regards,

Post Reply

Return to “Babylon - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest