Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Navigation Profiles

A navigation profile defines the navigation structure for a specific device type. Each profile has a default home page, optional role-specific home pages, an optional login page, and a menu.

Profile Types

ProfileMDL NameDescription
Responsive webResponsiveDefault browser navigation
Tablet webTabletTablet-optimized browser navigation
Phone webPhonePhone-optimized browser navigation
Responsive web offlineResponsiveOfflineOffline-capable (PWA)
Tablet web offlineTabletOfflineOffline-capable (PWA)
Phone web offlinePhoneOfflineOffline-capable (PWA)
Native mobileNativePhoneReact Native mobile navigation

The web kinds are a closed set and the profile is created if the project does not have it yet. The offline kinds are the online names plus Offline.

CREATE OR REPLACE NAVIGATION

Replaces an entire navigation profile:

CREATE OR REPLACE NAVIGATION <Profile>
  HOME PAGE <Module>.<Page>
  [HOME PAGE <Module>.<Page> FOR <UserRole>]
  [LOGIN PAGE <Module>.<Page>]
  [NOT FOUND PAGE <Module>.<Page>]
  [{
    <menu-items>
  }]

The menu items are the profile’s children, in { } after its clauses and with no ; between them. The old MENU ( … ) block still parses and warns (MDL-DEPR121).

Full Example

CREATE OR MODIFY NAVIGATION Responsive
  HOME PAGE MyModule.Home_Web
  HOME PAGE MyModule.AdminHome FOR Administrator
  LOGIN PAGE Administration.Login
  NOT FOUND PAGE MyModule.Custom404
  {
    MENU ITEM 'Home' ( OnClick: SHOW PAGE MyModule.Home_Web )
    MENU ITEM 'Orders' ( OnClick: SHOW PAGE Shop.Order_Overview )
    MENU 'Administration' {
      MENU ITEM 'Users' ( OnClick: SHOW PAGE Administration.Account_Overview )
      MENU ITEM 'Settings' ( OnClick: SHOW PAGE MyModule.Settings )
    }
  };

Minimal Example

A profile only requires a home page:

CREATE OR MODIFY NAVIGATION Phone
  HOME PAGE MyModule.Home_Phone;

Offline Synchronization

An offline profile downloads nothing until its entities have a sync mode. Without a sync block the app builds, routes and installs as a PWA — and shows an empty screen. This is the most common way an offline profile looks broken while every check passes.

create or modify navigation PhoneOffline
  home page MyModule.Mobile_Dashboard
  sync (
    sync MyModule.Setting online;
    sync MyModule.Order all;
    sync MyModule.Trip where [Distance > 0];
    sync MyModule.Audit never;
    sync MyModule.Lookup none;
    sync MyModule.Draft none preserve data;
  );
ModeMeaning
onlinefetched from the server, never held on the device
allevery object downloaded
where [xpath]only the objects the XPath selects
nevernot synchronized
nonenot downloaded; anything already on the device is dropped
none preserve datanot downloaded; what is on the device stays

The words are the values Mendix stores, not Studio Pro’s captions — its “All Objects” is all and its “By XPath” is where. Copying a caption gives a parse error rather than a broken document.

See ALTER NAVIGATION for the full reference.

DESCRIBE NAVIGATION

View the current navigation profile in MDL syntax:

-- All profiles
DESCRIBE NAVIGATION;

-- Single profile
DESCRIBE NAVIGATION Responsive;

The output is round-trippable – you can copy it, modify it, and execute it as a CREATE OR REPLACE NAVIGATION statement.

See Also