Skip to main content

applyMenuLayout

Applies the canonical navigation layout — relocationsremovalssettingsSection — to an already-merged menu. Exposed separately from buildManifest for apps that assemble their menu through a different path but still want the shared layout semantics.

import { applyMenuLayout } from '@conduction/nextcloud-vue'

const laidOut = applyMenuLayout(menu, { relocations, removals, settingsSection })
ParamTypeDescription
menuArray<object>The merged menu (mutated in place by the steps).
menuLayoutobject{ relocations?, removals?, settingsSection? }.

Returns the laid-out menu. Runs applyMenuRelocations, then applyMenuRemovals, then applySettingsSection.