Dynamic menus
We would like to add some additional menu items to the main navigation (e.g. link to the institute website).
Add assets/menu.json
and fetch this file in client.tsx
. Put the parsed JSON object to window.extMenus
.
[
{
"title": "Intranet",
"link": "https://intranet.local"
},
{
"title": "Public website",
"link": "https://www.institute"
},
];
When rendering the top-level navigation, include items from window.extMenus
below "Home".
This should not execute in SSR mode, only in the browser!