Switch between applications in same browser tab

We have two Mendix applications that we present as if it is one application. To do so, both applications have the same menu. Each menu option has on click event 'Open link' where we use a literal value for the URL, this because we have not found a way to use an attribute for a navigation menu.  Our problem is that we are not able to open links in the same browser tab, but that each link is opened in a new tab. Has somebody encountered the same problem and find a solution? Another solution would be to add the option to specify where to open the link in the modeler.
3 answers

I’ve seen 2 solutions for this:


Hi Alain,

I've run into the same issue before but with the a navigation tree. I was able to recreate the standard navigation tree using a table with microflow buttons and the mx navigation tree classes. This allowed me to pass a parameter to my microflows when opening  a new page. In you case, you want to do something similar but with the menu bar. In a test project I was able to recreate the menu bar using a layout grid and microflow buttons.

Here is an example:

The first thing I did was replaced the menu bar in the atlas top bar layout with a snippet.


In the snippet I have a dataview with microflow datasource that retrieves the object that contains the links for my menu bar. Then I added a layout grid with a container inside it and an action button.


The layout grid has classes 

navbar navbar-default mx-navbar mx-name-menuBar1 hidden-xs


The container has classes



The action button has the styling 

color: #555555;
font-size: 14px;
border-color: transparent;
min-height: 60px;


and now I can set the action button to open a link based on an attribute from the object in my dataview.


Here is the before and after


default menu bar


custom menu bar

With some more styling you can change the on hover and active colors to match the default menu bar.


Hope this helps!


FormatString and HTMLSnippet are also an option.

Mendix uses this quite a lot on the forum/sprintr/cloud/... pages, as these are also separate apps.