JustFlows

Documentation is English-only for now. The rest of the site follows your language.

Menus

Nested navigation: custom links, pages, and posts. The primary menu cannot be deleted.

4 min read

Admin → Menus. CRUD is at /api/menus for administrators and editors. Items can be custom URLs, pages, or posts, and they nest. The primary menu is undeletable.

Public rendering reads menus through jf-cache (menus: prefix) and the `navigation.items` filter, so a plugin can add, remove, or relabel links without forking the theme.

Filter navigation in a plugin
ts
ctx.hooks.filter("navigation.items", (items, { location }) => {
  if (location !== "primary") return items;
  return items.filter((item) => item.url !== "/hidden");
});