[data-reveal]{opacity:1!important;transform:none!important}
Navigation
Frontend

Navigation

How the site layout travels as an Inertia once prop, which navigations skip the server, and how DmsLink prefetches.

Every visit's page object carries the page (page: its route and layout), the session (user, session) and the site layout (shared: the menu with each entry's access, quick actions, modules). The site layout is most of that object, and the same from page to page, so it travels as an Inertia once prop.

See the built-in dashboard for the shell and its command-palette capture. To add UI around a page, the dashboard chrome guide shows a real playground side panel. The rules below describe how navigation loads that UI, not how to register menu entries or panels.

The site layout, once

  • The server sends the layout when the browser does not hold it for the session's account and workspace, then asks the backend for the page alone (/dms/page?path=…&shared=false) while the browser's copy is less than five minutes old.
  • Signing in, signing out, or switching account or workspace changes the key the copy is held under, so the next visit brings the new session's layout.
  • router.reload({ only: ["shared"] }) reloads it at once. only and except name any of page, shared, user and session, and the server fetches only what is named. The DMS reloads the menu this way when the backend announces a change.
The access a menu entry shows is for display. The backend checks access on every request, whatever the menu says.

A navigation that changes only the query or the hash of the page on screen, through useDmsRouter().push({ query }), navigateDms or DmsLink, is an Inertia client-side visit. The URL and the history entry change, the page stays mounted with its props, and no request is made, since the page props depend on the path alone.

Pass a server-only option (only, data, headers, onStart…) to make the request anyway. An error page is always left through the server.

Prefetching

DmsLink prefetches the page it points to on hover. Once Inertia has the props, the page, its layout and its block components start loading, so following the link waits for neither. A change of account or workspace, and signing out, drop the prefetched pages.