Is Possible to change my menu style during run time

i just use BaseTheme, none other forge component were used and my default menu style is "TopMenu" now i need to change it to SideMenu style when i choose it on runtime


Thanks in Advance

Hi Afonso,

Thats also asked by myself but now i need to change menu layout...

My apologies: I understood "menu style" as CSS and thought you were asking the same question, but applied to the Menu.

If your Menu is a webblock you could control which one gets loaded into the page with an If. But the biggest issue I see isn't the Menu itself but the way the rest of your page is organised:

This is an example of the LayoutMenuTop on the OutsystemsUIWeb component. And this is the SideMenu layout from the same component:

They're different layouts and they're prepared to receive different things. I don't know how your pages are constructed, but depending on the Layout that they use, you may very well have to load completely different layouts instead of just controlling which Menu gets rendered.

Do you think you could give us an example of the way you've built your pages? Screenshots of their layout, or an espace?

This is widget tree structure of my web screen, sorry i can't understand how to add different menu style in same Layout

I don't think you'll be able to do it in the same Layout. They will practically be two different pages. I'm not aware of an Outsystems provided layout that can support both types of Menu at once, so either:

 - you build your own Layout that can do this, or

 - you import the SideMenu layout from OutsystemsUIWeb (or another Outsystems provided Layout that is suited for side menus) and then control which Layout gets loaded into your page.

Afonso Carvalho wrote:

I don't think you'll be able to do it in the same Layout. They will practically be two different pages. I'm not aware of an Outsystems provided layout that can support both types of Menu at once, so either:

 - you build your own Layout that can do this, or

 - you import the SideMenu layout from OutsystemsUIWeb (or another Outsystems provided Layout that is suited for side menus) and then control which Layout gets loaded into your page.


Thanks Afonso

so i need to build own layout to do that operation right?

Hi Umar,


Afonso is correct. But, one work around can be using different layout for different screens and redirecting between those screens.


Regards,

Rushabh

Umar Ali wrote:

Afonso Carvalho wrote:

I don't think you'll be able to do it in the same Layout. They will practically be two different pages. I'm not aware of an Outsystems provided layout that can support both types of Menu at once, so either:

 - you build your own Layout that can do this, or

 - you import the SideMenu layout from OutsystemsUIWeb (or another Outsystems provided Layout that is suited for side menus) and then control which Layout gets loaded into your page.


Thanks Afonso

so i need to build own layout to do that operation right?

Yes. I would advise you to look at the Outsystems provided Templates for ideas.