Skip to content

Conversation

@bszyman
Copy link
Contributor

@bszyman bszyman commented Oct 13, 2025

📋 Description

Document "Menu Items" extension type for Umbraco: added new section in "Extension Types" with examples for manifest and TypeScript approaches, detailed usage, and custom implementations. Updated summary to include the new section.

📎 Related Issues (if applicable)

#7495

✅ Contributor Checklist

I've followed the Umbraco Documentation Style Guide and can confirm that:

  • Code blocks are correctly formatted.
  • Sentences are short and clear (preferably under 25 words).
  • Passive voice and first-person language (“we”, “I”) are avoided.
  • Relevant pages are linked.
  • All links work and point to the correct resources.
  • Screenshots or diagrams are included if useful.
  • Any code examples or instructions have been tested.
  • Typos, broken links, and broken images are fixed.

Product & Version (if relevant)

v16

Deadline (if relevant)

N/A

📚 Helpful Resources

Copy link
Contributor

@madsrasmussen madsrasmussen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bszyman

It looks good!

We somehow need to cover that the default manifest has an optional meta field for "entityType". When using this, it will automatically link to a matching workspace and show any registered Entity Actions for that type. It is a bit magical, but I think a lot will look for this setting.

Additionally, I think it would be beneficial to cover some of the different Menu Item kinds we ship out of the box. It might also help make the extension experience better if we can get something to show as fast as possible in the UI. Additionally, when using one of the kinds, the developer gets a lot of functionality out of the box by just filling out the manifest. 

I think these kinds should be mentioned first in the article, then your custom example as the last one.

Example from the codebase:

{
  type: 'menuItem',
  alias: 'Umb.MenuItem.Users',
  name: 'Users Menu Item',
  weight: 200,
  meta: {
    label: '#treeHeaders_users',
    icon: 'icon-user',
    entityType: UMB_USER_ROOT_ENTITY_TYPE,
    menus: [UMB_USER_MANAGEMENT_MENU_ALIAS],
   },
 }

Here are some rough notes about the different kinds:

We currently have 3 different kinds:

  • Link: Link to any resource.
  • Action: Almost the same as the default behaviour, but do not support the Entity Type and therefore not the entity actions.
  • Tree: Render a tree-based sub-menu inside the menu item

The following manifest examples are taken directly from the codebase. Feel free to adjust so it becomes a bit more generic:

Link

Register a menu item that can link to something. Mostly used when linking to something external:

Manifest:

{
  type: 'menuItem',
  kind: 'link',
  alias: 'Umb.MenuItem.Help.LearningBase',
  name: 'Learning Base Help Menu Item',
  weight: 200,
  meta: {
    menus: [UMB_HELP_MENU_ALIAS],
    label: 'Umbraco Learning Base',
    icon: 'icon-movie-alt',
    href: 'https://umbra.co/ulb',
  },
}

Action

A Menu Item with a custom Api Class. An executed method will be triggered when the menu item is clicked. This one is very close to the default menu item but it is not possible to pass in an entityType and therefore won't automatically link to a workspace or support Entity Actions.

Manifest

{
  type: 'menuItem',
  kind: 'action',
  alias: 'Umb.MenuItem.Tiptap.TableProperties',
  name: 'Tiptap Table Menu Item: Table Properties',
  api: () => import('./actions/table-properties.action.js'),
  weight: 110,
  meta: {
    label: 'Table properties',
    menus: [UMB_MENU_TIPTAP_TABLE_ALIAS],
  },
}

Tree

Register a menu item with a sub-menu based on a tree structure. If the developer has already implemented and registered a Tree Repository, they can reference the Tree Repository extension alias in the Menu Item manifest and get a full tree-based menu out of the box.

Manifest

{
  type: 'menuItem',
  kind: 'tree',
  alias: UMB_MEDIA_MENU_ITEM_ALIAS,
  name: 'Media Menu Item',
  weight: 100,
  meta: {
    label: 'Media',
    menus: [UMB_MEDIA_MENU_ALIAS],
    treeAlias: UMB_MEDIA_TREE_ALIAS,
    hideTreeRoot: true,
  },
}

@bszyman
Copy link
Contributor Author

bszyman commented Nov 19, 2025

@madsrasmussen - Excellent suggestions (especially the info on menu item kinds), thanks for taking the time to review! I updated the doc, and also copied over to v17, but lmk if you see room for any other improvements!

…n "Extension Types" with examples for manifest and TypeScript approaches, detailed usage, and custom implementations. Updated summary to include the new section.
Copy link
Contributor

@madsrasmussen madsrasmussen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bszyman. It looks amazing. Great explanations of each kind. I have done a few updates to the examples to align them across the article.

I have also opened a PR for the CMS repo with an example of each kind: umbraco/Umbraco-CMS#20910

@madsrasmussen
Copy link
Contributor

@eshanrnh This one is ready for review now. We are happy when you are happy 😃

Copy link
Contributor

@eshanrnh eshanrnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks excellent 🙌 I have added a few suggestions to fix the Vale error and addressed some style stuff that I'll take care of 💪

@eshanrnh eshanrnh merged commit 352d4ff into umbraco:main Nov 21, 2025
71 of 77 checks passed
@bszyman bszyman deleted the menu-items branch November 21, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants