Change side menu to top

Hi!

How can I switch side menu to top menu on main screen or other screens in Jmix like in CUBA?

1 Like

Hello,

Here’s an example of main screen with top menu:

<layout expand="workArea">
    <hbox id="header"
          expand="mainMenu"
          margin="false;true;false;true"
          stylename="c-app-menubar"
          spacing="true"
          width="100%">
        <image id="logoImage"
               align="MIDDLE_CENTER"
               scaleMode="SCALE_DOWN"
               stylename="app-icon">
            <theme path="branding/app-icon-menu.svg"/>
        </image>
        <menu id="mainMenu"
              align="MIDDLE_LEFT"/>
        <userIndicator id="userIndicator"
                       align="MIDDLE_LEFT"/>
        <timeZoneIndicator id="timeZoneIndicator"
                           align="MIDDLE_LEFT"/>
        <hbox id="mainButtonsBox"
              align="MIDDLE_LEFT"
              stylename="c-main-buttons">
            <newWindowButton id="newWindowButton"
                             icon="TH_LARGE"
                             description="msg://newWindowBtnDescription"/>
            <logoutButton id="logoutButton"
                          description="msg://logoutBtnDescription"
                          icon="SIGN_OUT"/>
        </hbox>
    </hbox>
    <workArea id="workArea"
              stylename="c-workarea"
              width="100%">
        <initialLayout margin="true"
                       spacing="true">
        </initialLayout>
    </workArea>
</layout>

See the demo project: demo.zip (79.3 KB)

1 Like

Thanks!